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. Making window as compact as possible?

Making window as compact as possible?

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 3 Posters 1.1k 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
    Pippin
    wrote on last edited by
    #1

    Hello, is there an option somewhere that makes a QMainWindow as compact as possible? I created a window that always uses more space that it needs to, and I was wondering if Qt could handle the minimization of the window for me.

    Thanks a lot!

    raven-worxR 1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi
      If u use layouts, then settings size
      of mainwindow will make it as small as possible.
      So what you expect such minimization to do?

      1 Reply Last reply
      0
      • P Pippin

        Hello, is there an option somewhere that makes a QMainWindow as compact as possible? I created a window that always uses more space that it needs to, and I was wondering if Qt could handle the minimization of the window for me.

        Thanks a lot!

        raven-worxR Offline
        raven-worxR Offline
        raven-worx
        Moderators
        wrote on last edited by
        #3

        @Pippin

        mainWindow->resize( mainWindow->layout()->minimumSize() );
        

        --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
        If you have a question please use the forum so others can benefit from the solution in the future

        1 Reply Last reply
        2
        • P Offline
          P Offline
          Pippin
          wrote on last edited by
          #4

          Perfect, thanks again!

          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