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. mac style: merged title bar and content area?
QtWS25 Last Chance

mac style: merged title bar and content area?

Scheduled Pinned Locked Moved Solved General and Desktop
9 Posts 3 Posters 927 Views
  • 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.
  • D Offline
    D Offline
    davecotter
    wrote on 24 Sept 2019, 18:21 last edited by
    #1

    not using Qt i can create a window where the title bar appear to be part of the content:

    Screen Shot 2019-09-24 at 10.24.40 AM.png

    using Qt i can't seem to get that effect:

    Screen Shot 2019-09-24 at 10.18.58 AM.png

    if i try "unifiedTitleAndToolBarOnMac", it looks a WEE bit better, but doesn't do the job:

    Screen Shot 2019-09-24 at 10.24.21 AM.png

    how do i get what i want? I think it may be related to "brushed metal" look but that's been removed? (using latest Qt)

    1 Reply Last reply
    1
    • D Offline
      D Offline
      davecotter
      wrote on 6 Feb 2025, 19:29 last edited by
      #9

      workaround: Add Qt::NoTitleBarBackgroundHint window flag

      1 Reply Last reply
      0
      • D Offline
        D Offline
        davecotter
        wrote on 25 Sept 2019, 21:50 last edited by
        #2

        does nobody have an idea?

        1 Reply Last reply
        0
        • M Offline
          M Offline
          mpergand
          wrote on 25 Sept 2019, 23:01 last edited by mpergand
          #3

          Have a try with this method of QMainWindow:

          unifiedTitleAndToolBarOnMac : bool
          This property holds whether the window uses the unified title and toolbar look on OS X.
          Note that the Qt 5 implementation has several limitations compared to Qt 4:
          Use in windows with OpenGL content is not supported. This includes QGLWidget and QOpenGLWidget.
          Using dockable or movable toolbars may result in painting errors and is not recommended
          This property was introduced in Qt 5.2.
          Access functions:
          
          bool 
          unifiedTitleAndToolBarOnMac() const
          void 
          setUnifiedTitleAndToolBarOnMac(bool set)
          

          [EDIT]

          if i try "unifiedTitleAndToolBarOnMac", it looks a WEE bit better, but doesn't do the job:

          Sorry i missed that ...

          1 Reply Last reply
          0
          • D Offline
            D Offline
            davecotter
            wrote on 25 Sept 2019, 23:52 last edited by
            #4

            @davecotter said in mac style: merged title bar and content area?:

            unifiedTitleAndToolBarOnMac

            sigh. why remove the "brushed metal" selector when the OS still supports it, even if deprecated?

            1 Reply Last reply
            0
            • D Offline
              D Offline
              davecotter
              wrote on 1 Oct 2019, 21:36 last edited by
              #5

              nobody knows?

              1 Reply Last reply
              0
              • D Offline
                D Offline
                davecotter
                wrote on 5 Feb 2025, 19:05 last edited by
                #6

                some intervening update HAD fixed the issue, up to Qt 6.8.0
                Screenshot 2025-02-05 at 11.01.29 AM.png

                but now, in Qt 6.9 beta 2, the problem is back:
                Screenshot 2025-02-05 at 11.04.41 AM.png

                Is this a bug?

                1 Reply Last reply
                1
                • S Offline
                  S Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on 5 Feb 2025, 20:12 last edited by
                  #7

                  Hi

                  I am not sure to follow you. Do you want to have the window title bar to have the same tint as your application window content ?

                  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
                  • D Offline
                    D Offline
                    davecotter
                    wrote on 5 Feb 2025, 20:32 last edited by
                    #8

                    in the most recent post, i want the 6.9 version to look like the 6.8 version.
                    so i guess the answer is yes, same exact "tint" or color, yes.

                    i thought that's what unifiedTitleAndToolBarOnMac did? but apparently not any more?

                    1 Reply Last reply
                    0
                    • D Offline
                      D Offline
                      davecotter
                      wrote on 6 Feb 2025, 19:29 last edited by
                      #9

                      workaround: Add Qt::NoTitleBarBackgroundHint window flag

                      1 Reply Last reply
                      0
                      • D davecotter has marked this topic as solved on 6 Feb 2025, 19:29

                      • Login

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