Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set QMainWindow title

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.

like image 262
houbysoft Avatar asked Dec 28 '10 21:12

houbysoft


People also ask

How do I change the title of a window in Qt?

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.

How do I remove the title bar in Qt?

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.


1 Answers

The method is setWindowTitle():

setWindowTitle(const QString &) 

http://doc.qt.io/qt-4.8/qwidget.html#windowTitle-prop

like image 153
Edward Strange Avatar answered Oct 04 '22 19:10

Edward Strange