Qt6 topics merged with General

How can I add a label to a QWidget's title bar?

  • I want to add a label to a QMainWindow title bar, do you know if it is possible to do that and how should I do it ?


  • Unless you mean a tool bar or the status bar, this is in general not possible since the title bar is outside of Qt's control (it is provided by the window manager).

    There may be platform-specific solutions for adding things to the title bar though. At least I've seen applications that appear to do that on Windows and Mac. But you would have to use the platform API for that.

Log in to reply