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, like a grid should be. I can do this easily with the tiles' paintEvents.

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!
Put the
QFrameinto aQGridLayout, then put a customQWidgetwith transparent background andpaintEventthat paints the grid on top of it (sameQGridLayoutposition).Or since you already have a
QGridLayout, just put the customQWidgetin that, above the tiles, filling the entire grid.A side note, are you sure you want
QFramethere, or if justQWidgetwould do? Just saying, because withQFrameyou get that 1990's look into your UI... If you do want that then go ahead, just saying.