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. How to combine fixed widgets with flexible layouts?
Forum Updated to NodeBB v4.3 + New Features

How to combine fixed widgets with flexible layouts?

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

    Hi! I am new to C++ GUI from QML, I am implementing sth like this:

    Untitled.jpg

    Some layouts 1 & 2 are flexible layouts while Button 1 & 2 are fixed both in sizes and positions. Button 3 & 4 are fixed in HORIZONTAL Positions(They always align to the right of the main widget), they are with fixed sizes, and they align with Some layouts 1 & 2 VERTICALLY.
    Could some one provide me with a general solution? I can look into details myself. Thank you very much

    M 1 Reply Last reply
    0
    • S StudyQt1

      Hi! I am new to C++ GUI from QML, I am implementing sth like this:

      Untitled.jpg

      Some layouts 1 & 2 are flexible layouts while Button 1 & 2 are fixed both in sizes and positions. Button 3 & 4 are fixed in HORIZONTAL Positions(They always align to the right of the main widget), they are with fixed sizes, and they align with Some layouts 1 & 2 VERTICALLY.
      Could some one provide me with a general solution? I can look into details myself. Thank you very much

      M Offline
      M Offline
      mpergand
      wrote on last edited by
      #2

      @StudyQt1

      Basically, it's a vertical layout with horizontal layouts in it.
      You may add/remove vertical spacers to the flexible zones you want.

      S 1 Reply Last reply
      1
      • M mpergand

        @StudyQt1

        Basically, it's a vertical layout with horizontal layouts in it.
        You may add/remove vertical spacers to the flexible zones you want.

        S Offline
        S Offline
        StudyQt1
        wrote on last edited by StudyQt1
        #3

        @mpergand Thank you very much, looks like many people tend to use .ui to design GUI and include .ui file into the project. It's easy to use, but it seems our project doesn't allow to use .ui file, we use only C++(I don't know why...).

        Can I refer to the .ui file to "translate" it to C++ codes? I am sorry I was a QML programmer, I know little about C++ GUI

        1 Reply Last reply
        0
        • C Offline
          C Offline
          ChrisW67
          wrote on last edited by
          #4

          Run the UI file through the uic utility to get some C++ code that constructs the UI.

          1 Reply Last reply
          1

          • Login

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