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. Widget Size when programm starts, how can I affect the size without setting max or min?
Forum Updated to NodeBB v4.3 + New Features

Widget Size when programm starts, how can I affect the size without setting max or min?

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 2 Posters 794 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.
  • K Offline
    K Offline
    KonradMD
    wrote on last edited by
    #1

    Hi,

    my research did not help me further. If I am starting my programm, my lowest Widget ist super big and the upper widget super small. I can change it with my Splitter, but how can I change it by code?

    1 Reply Last reply
    0
    • K Offline
      K Offline
      KonradMD
      wrote on last edited by
      #2
      This post is deleted!
      1 Reply Last reply
      0
      • ? Offline
        ? Offline
        A Former User
        wrote on last edited by
        #3

        Hi! Please provide a screenshot, diagram or code.

        1 Reply Last reply
        0
        • K Offline
          K Offline
          KonradMD
          wrote on last edited by
          #4

          I found the setStretchFactor method or setStreched. It is just possible with layouts, not with widgets itself. But it does not work properly. The stretch factor 1 is enough to change the upper widget to the super big size and the lower widget to the super small size. It is really confusing.
          Does somebody used it before and can give me some advice, maybe I forgot a declaration when setting the widget?

          @Wieland thanks for your comment, I dont have code for that, maybe thats the problem, I did it with qt designer. 0_1502291554051_Splitter.png

          1 Reply Last reply
          0
          • K Offline
            K Offline
            KonradMD
            wrote on last edited by KonradMD
            #5

            The setSizes method with a qlist is working better. I just take the half of the complete mainwindow and I get what I want.

            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