Create a titleless window - QT Designer

How can I declare a window without a title when using QT Designer?

+4
source share
2 answers

if you want to remove the window title, the easiest way would be to set the window flags in the widget constructor, for example:

MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent, Qt::FramelessWindowHint), //<-- this will remove the title bar ui(new Ui::MainWindow) { ui->setupUi(this); ... 

or challenge

 Qt::WindowFlags flags = Qt::CustomizeWindowHint; setWindowFlags(flags); 

more information about window types here: enum Qt :: Flags WindowType Qt :: WindowFlags

hope this helps, believes

+9
source

You didn’t say what language you mean, so I’m saying how to do it in Python with Qt: First of all , you cannot do it in Qt Designer!

Once you have developed your GUI using the Qt designer application, you should add this python line for FILE . py (generated using pyuic5):

MainWindow.setWindowFlags(QtCore.Qt.CustomizeWindowHint)

-1
source

Source: https://habr.com/ru/post/1337069/


All Articles