Qt:如何从主窗口中删除默认的主工具栏? [英] Qt: How to remove the default main toolbar from the mainwindow?
本文介绍了Qt:如何从主窗口中删除默认的主工具栏?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我是新的Qt,我不知道为什么在我的主窗口中有一个可拖动对象。
I am new to Qt, and I can't figure out why there is a draggable object in my main window. It starts at the top of the screen in its exapanded form.
然后我可以拖动它并缩小成一个正方形。
And then I can drag it and it shrinks into a square.
推荐答案
您需要从下面的代码中手动删除QtDesigner中的主工具栏:
You need to remove the main toolbar from either QtDesigner as can be seen below or from the code manually:
然后,您需要重新运行qmake进行更改效果,因为 ui_mainwindow.h
头文件需要从更新的 mainwindow.ui
描述文件重新生成。
Then, you will need to rerun qmake for the changes to take effect as the ui_mainwindow.h
header file needs to be regenerated from the updated mainwindow.ui
description file.
>
这篇关于Qt:如何从主窗口中删除默认的主工具栏?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文