Problems with Open-Source Downloads read https://www.qt.io/blog/problem-with-open-source-downloads and https://forum.qt.io/post/638946

Maintaining a consistent width in QBoxLayout



  • I have a QHBoxLayout of 52 QPainter rectangles. I want the layout to be freely (or almost freely) resizable with the one requirement that the rectangles should have the exact same width. Right now, if I choose a size of (for example) 52 * 32 = 1664 pixels with one-pixel separators, some of the individual rectangles end up 30 pixels wide, and others 31. In my program, the effect of this inconsistency is quite noticeable.



  • Ideas, anyone?


Log in to reply