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. QToolbar. Caption and "x" button
Qt 6.11 is out! See what's new in the release blog

QToolbar. Caption and "x" button

Scheduled Pinned Locked Moved General and Desktop
4 Posts 3 Posters 4.1k 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.
  • B Offline
    B Offline
    blex
    wrote on last edited by
    #1

    QToolbar. How to display caption with the title and "x" button for the floating toolbar?

    In Qt3 it was out-of-the-box, in Qt4 I cannot find how to do this.


    Oleksiy Balabay

    1 Reply Last reply
    0
    • B Offline
      B Offline
      baysmith
      wrote on last edited by
      #2

      The Qt4 QToolBar doesn't have this capability. However, you probably change the behavior by hooking into the topLevelChanged() signal.

      Nokia Certified Qt Specialist.

      1 Reply Last reply
      0
      • B Offline
        B Offline
        blex
        wrote on last edited by
        #3

        [quote author="Bradley" date="1291571278"]The Qt4 QToolBar doesn't have this capability. However, you probably change the behavior by hooking into the topLevelChanged() signal.[/quote]

        Thanks for advice. I will try.


        Oleksiy Balabay

        1 Reply Last reply
        0
        • I Offline
          I Offline
          infoctopus
          wrote on last edited by
          #4

          blex, also you can use setWindowFlags(). Prior to calling this method you might need to hide() the toolbar.

          Qt rulez

          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