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. Centralwidget: as small as possible

Centralwidget: as small as possible

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 1.9k Views
  • 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.
  • K Offline
    K Offline
    Knacktus
    wrote on last edited by
    #1

    Hi guys,

    at startup my mainwindow has no dockwidgets. Only a label as centralwidget with one line of text. This label populates the whole windows area as expected. The user can add dockwidgets. As soon as the first dockwidget is created, I'd like my centralwidget to shrink to it's minimum size at the top of the main window. I'm messing around with sizePolicies but don't get it done. Is there a way to tell a widget to take as much space a possible?

    Thank you and cheers,

    Jan

    1 Reply Last reply
    0
    • G Offline
      G Offline
      goetz
      wrote on last edited by
      #2

      the central widgets get always the complete space of the main window which is not covered by dock areas. You might want to add some spacers to "squeeze" the label into the desired place.

      http://www.catb.org/~esr/faqs/smart-questions.html

      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