Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How can I add a label to a QWidget's title bar?
Qt 6.11 is out! See what's new in the release blog

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

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 3.8k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Sorin
    wrote on last edited by
    #1

    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 ?

    Thanks.

    There are only 10 types of people in the world: Those who understand binary, and those who don't

    1 Reply Last reply
    0
    • T Offline
      T Offline
      thorbjorn
      wrote on last edited by
      #2

      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.

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved