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. Layout spacing not working on MacOS X + cannot get rid of frame around layout

Layout spacing not working on MacOS X + cannot get rid of frame around layout

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 2 Posters 1.1k 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.
  • DiracsbracketD Offline
    DiracsbracketD Offline
    Diracsbracket
    wrote on last edited by Diracsbracket
    #1

    Hi,
    I have an application that runs shows perfectly fine in Windows. However, when built on MacOS X, the layout is broken in Qt 5.9.2 and Qt 5.9.4.

    In one instance, a horizontal layout has a spacing of 6, but all the buttons not separated by spacers are pushed one against each other,:
    0_1517588659960_c40bd3e4-b00d-4dae-8fc0-cf7586a843b5-image.png

    The same layout in Windows shows the correct spacing:
    0_1517588681956_f55d601c-fe5a-4bf0-92c6-98ae0ff6138e-image.png

    Also, I have another layout which contains a QLabel and a custom widget, and I can't get rid of the frame around the layout.
    0_1517588851416_821052fd-5075-4d61-b8af-73d72dc274b6-image.png

    Again, in Windows, this does not happen:
    0_1517588941366_10b981fb-05dc-43b7-b655-b120d69625da-image.png

    The contour around the level meter + qlabel is clearly from the layout, but since a QVBoxLayout has no style, where does that frame come from???

    Again, so much for Qt being cross-platform... Even a simple GUI setup cannot be ported directly without problems it seems...

    1 Reply Last reply
    0
    • DiracsbracketD Offline
      DiracsbracketD Offline
      Diracsbracket
      wrote on last edited by Diracsbracket
      #2

      For some reason, if I increase the layout spacing by a factor 3, the layout matches that of Windows, so I am now doing:

      #ifdef Q_OS_MAC
         ui->mediaButtonsLayout->setSpacing(18);
      #endif
      

      0_1517590483298_5b9ff695-52df-46d7-8b0a-68bb21344eea-image.png

      But still don't have a clue where that frame around the audio level layout comes from.

      1 Reply Last reply
      0
      • mrjjM Offline
        mrjjM Offline
        mrjj
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi
        That does indeed look odd.
        Are win/mac running same resolution ?

        DiracsbracketD 1 Reply Last reply
        0
        • mrjjM mrjj

          Hi
          That does indeed look odd.
          Are win/mac running same resolution ?

          DiracsbracketD Offline
          DiracsbracketD Offline
          Diracsbracket
          wrote on last edited by Diracsbracket
          #4

          @mrjj said in Layout spacing not working on MacOS X + cannot get rid of frame around layout:

          Are win/mac running same resolution

          Yes, they're both set to Full HD.

          Edit: I am an idiot. I forgot + didn't see that the layout was inside a QFrame which was set to StyledPanel + Raised... In Windows it is not visible under my current theme...
          OK. That's one down. Now the strange layout spacing problem...

          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