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

  • 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,:

    The same layout in Windows shows the correct spacing:

    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.

    Again, in Windows, this does not happen:

    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...

  • 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


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

  • Qt Champions 2017

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

  • @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...

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.