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. Top alignment of items
Forum Updated to NodeBB v4.3 + New Features

Top alignment of items

Scheduled Pinned Locked Moved General and Desktop
2 Posts 1 Posters 555 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.
  • S Offline
    S Offline
    swarsi
    wrote on last edited by
    #1

    i have a QTabWidget and in a tab i created a QGroupBox in which i have placed a QGridLayout into which i have placed 3 rows in the first column then i added a vertical spacer (QSpacerItem) in the fourth row hoping this spacer would take up all the vertical spacing and push all the items to the top of the group box but no matter what i have tried i cannot remove a space appearing at the top.

    i have tried setContentsMargins, setSpacing, etc. to no effect.

    !http://i.imgur.com/2eYGphG.png()!

    notice the spacing above the first button (New) i wan to remove this spacing.

    thanks

    1 Reply Last reply
    0
    • S Offline
      S Offline
      swarsi
      wrote on last edited by
      #2

      nevermind, i found that if i used the following style sheet then it gives me the behavior i desired.

             "QGroupBox {margin-top : 0px;}\n"
      
      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