Important: Please read the Qt Code of Conduct -

Overlaying grid on top of QGridLayout

  • So, I have a QFrame with its layout set as a QGridLayout.

    Within this layout I have tiles in rows of 16 which represent something of a palette.

    I want this grid of tiles to be separated by lines, However, the obvious problem is that between the tiles, the lines are doubled up. When I scale this up for other applications, the difference becomes even more noticeable.

    So, is there a way to create a gridline overlay for my QFrame? I have considered converting the whole thing to a view/scene solution, and using drawForeground, however this seems like a completely inappropriate use of the paradigm.

    Thanks for any assistance!

  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Since it's a palette why not draw everything by hand ?

Log in to reply