可尝试以下方法:
1、
void showEvent(QShowEvent *event)
{
this->setAttribute(Qt::WA_Mapped);
QWidget::showEvent(event);
}
2、界面控件切换前调用:
show();
qApp->processEvents();
3、update()
4、adjustSize();
5、resize(size());
可尝试以下方法:
1、
void showEvent(QShowEvent *event)
{
this->setAttribute(Qt::WA_Mapped);
QWidget::showEvent(event);
}
2、界面控件切换前调用:
show();
qApp->processEvents();
3、update()
4、adjustSize();
5、resize(size());
下一篇:如何获取qt控件的子控件
Qt界面优化:Qt应用程序设置
Qt项目,为主页上一个关闭按钮加功能,点击之后就关闭软件。那么退出程序的代码怎么写呢?代码如下
举报文章
请选择举报类型
补充说明
0/200
上传截图
格式支持JPEG/PNG/JPG,图片不超过1.9M