How do I set the title of a QMainWindow?
I tried googling and found setCaption(), but it appears it no longer works in Qt 4.
EDIT: If you are using QtDesigner, on the property tab, there is an editable property called windowTitle which can be found under the QWidget section. The property tab can usually be found on the lower right part of the designer window.
To remove the frame of any window using Qt you need to use the following piece of code: setWindowFlags(Qt::Window | Qt::FramelessWindowHint); Note that this will also cause the title bar of the window to be removed which means there will be no “close”, “minimize” and “maximize” buttons.
The method is setWindowTitle()
:
setWindowTitle(const QString &)
http://doc.qt.io/qt-4.8/qwidget.html#windowTitle-prop
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With