Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Maintaining a consistent width in QBoxLayout
Forum Updated to NodeBB v4.3 + New Features

Maintaining a consistent width in QBoxLayout

Scheduled Pinned Locked Moved General and Desktop
2 Posts 1 Posters 872 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    planarian
    wrote on last edited by
    #1

    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.

    1 Reply Last reply
    0
    • P Offline
      P Offline
      planarian
      wrote on last edited by
      #2

      Ideas, anyone?

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved