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. Prevent QTabWidget from painting grey background box on macOS?

Prevent QTabWidget from painting grey background box on macOS?

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

    I am trying to prevent QTabWidget from printing the grey background box on macOS. I will eventually restyle the QTabBar as well and want this whole widget to be flat.

    Ideas?

    Thanks!

    0_1531505196268_2018-07-13_11-04-55.jpg

    https://alaskafamilysystems.com/

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

      Hi,

      One way would be to use a style sheet since you are going to re-style the rest of the widget.

      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
      • P Offline
        P Offline
        patrickkidd
        wrote on last edited by
        #3

        Yes, I am having trouble figuring out what the css element would be for that.

        https://alaskafamilysystems.com/

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

          Apply it on the widget you insert into the tab widget.

          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
          • P patrickkidd

            Yes, I am having trouble figuring out what the css element would be for that.

            kshegunovK Offline
            kshegunovK Offline
            kshegunov
            Moderators
            wrote on last edited by
            #5

            Tried disabling automatic background filling?

            Read and abide by the Qt Code of Conduct

            P 1 Reply Last reply
            0
            • kshegunovK kshegunov

              Tried disabling automatic background filling?

              P Offline
              P Offline
              patrickkidd
              wrote on last edited by
              #6

              @kshegunov It looks like auto background filling is disabled by default for both QTabWidget and the pane widgets that are added for each tab.

              @SGaist I think this is painted by QTabWidget and not part of the sub-widgets (see screenshot):

              0_1531530602588_2018-07-13_18-08-36.jpg

              https://alaskafamilysystems.com/

              kshegunovK 1 Reply Last reply
              0
              • P patrickkidd

                @kshegunov It looks like auto background filling is disabled by default for both QTabWidget and the pane widgets that are added for each tab.

                @SGaist I think this is painted by QTabWidget and not part of the sub-widgets (see screenshot):

                0_1531530602588_2018-07-13_18-08-36.jpg

                kshegunovK Offline
                kshegunovK Offline
                kshegunov
                Moderators
                wrote on last edited by
                #7

                @patrickkidd said in Prevent QTabWidget from painting grey background box on macOS?:

                I think this is painted by QTabWidget and not part of the sub-widgets (see screenshot)

                You can test that. If you create an empty tab widget (without any widgets in it) you would observe the differences in colors if the tab widget is responsible, otherwise the panes are responsible for it (or both the tab widget and the panes). Also you could try to get the palette from the main window and set it to the tab widget, albeit it seems rather unlikely that'd help.

                Read and abide by the Qt Code of Conduct

                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