Skip to content
  • 0 Votes
    12 Posts
    1k Views
    K

    I managed to solve the issue changing the code to:

    ColumnLayout { id: listcolumn2 Layout.fillWidth: true Layout.preferredWidth: 500 Layout.minimumWidth: 100 spacing: 0 ColumnLayout { id: sublistcolumn1 Text{...} ListView { id: lv1 Layout.fillHeight: true Layout.fillWidth: true Layout.minimumHeight: lv1.contentItem.childrenRect.height } Layout.fillWidth: true Layout.preferredWidth: 500 Layout.minimumWidth: 100 } ColumnLayout { id: sublistcolumn2 Text{...} ListView { id: lv2 Layout.fillHeight: true Layout.fillWidth: true Layout.minimumHeight: lv2.contentItem.childrenRect.height } Layout.fillWidth: true Layout.preferredWidth: 500 Layout.minimumWidth: 100 } Item { id: filler Layout.fillHeight: true Layout.fillWidth: true Layout.preferredWidth: 500 Layout.minimumWidth: 100 } }
  • 0 Votes
    8 Posts
    26k Views
    W

    @J.Hilk said in Set fixed margin/spacing/padding between Widgets/Layouts:

    @wrekler you have to set the margin and spacing of the QLayout item to 0 as well, not only in the StyleSheet. I believe those are 2 different pairs of shoes.

    @JonB said in Set fixed margin/spacing/padding between Widgets/Layouts:

    To clarify what @J-Hilk is saying (which I believe to be correct): a QLayout is not a QWidget and so cannot have its attributes affected via a stylesheet rule (sadly). That has to be done via explicit, back-end code.

    Here we go! That was the problem! Layout cannot be affected by a stylesheet file! Now I know how styling layout works! Thank!

  • 0 Votes
    7 Posts
    3k Views
    B

    I think I was finally able to solve the problem.

    As the solution suggested by @hskoglund is Windows-specific, I decided to first investigate a bit deeper the other options presented by @J-Hilk

    It turned out that the Qt::WindowStaysOnTopHint flag was not set for our main window. I am now setting that flag in our main windows's constructor, and afterwards show it full screen. This seems to work.

    Thanks again for your suggestions!

  • 0 Votes
    19 Posts
    7k Views
    G

    tl;dr

    It's QFrame adding this extra pixel.
    set frameShape to NoFrame

  • 0 Votes
    1 Posts
    522 Views
    No one has replied