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 to set different text for a QDockWidget's tab and window title?
Forum Updated to NodeBB v4.3 + New Features

How to set different text for a QDockWidget's tab and window title?

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 363 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.
  • X Offline
    X Offline
    xpog
    wrote on last edited by
    #1

    Hi everyone,

    We are trying to figure out how not to link the QDockWidget's tab title to the windows title.

    As you can see on the following picture, the QDockWidget's tab title is the same as the window title and we would like to force them to be different.
    image.png

    Unfortunatly, after some research we found the https://stackoverflow.com/questions/47518075/how-to-set-different-text-for-a-qdockwidgets-tab-and-window-title thread which deals with Python and we are using C++.

    Is someone aware of a solution which does not force us to redefine the paintEvent function ?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      What about connecting a slot to the topLevelChanged signal and change the text accordingly ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • X Offline
        X Offline
        xpog
        wrote on last edited by
        #3

        Hi,

        First, thank you for your answer !

        AFAIK this signal allows to know when the window is floating or not. Unfortunately, I do not see how to use it to change the name in the bottom red circle of the picture and not the title in the top red circle of the previous picture.

        I would like to "unlink" the two names in the red circle of the picture in the #1 message.

        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