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. QLayout
Qt 6.11 is out! See what's new in the release blog

QLayout

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

    Hey

    So, I am creating a mini project and I can't figure out how to use layouts.
    I know only how to use layouts without a code:(with Qt Designer) and I want to learn how to use layouts manually with code :/. Maybe someone could
    guide me for example how to make this kind of window(I attached photo) with layouts? Which kind of layout should I use and how many etc...?

    100672652_587879281854870_806221238983720960_n.jpg

    JonBJ 1 Reply Last reply
    0
    • privatepepperP privatepepper

      Hey

      So, I am creating a mini project and I can't figure out how to use layouts.
      I know only how to use layouts without a code:(with Qt Designer) and I want to learn how to use layouts manually with code :/. Maybe someone could
      guide me for example how to make this kind of window(I attached photo) with layouts? Which kind of layout should I use and how many etc...?

      100672652_587879281854870_806221238983720960_n.jpg

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by JonB
      #2

      @privatepepper
      If you say you know how to use layouts from Designer, why don't you look at the generated ui_... file to see just what code gets generated from uic?

      privatepepperP 1 Reply Last reply
      1
      • JonBJ JonB

        @privatepepper
        If you say you know how to use layouts from Designer, why don't you look at the generated ui_... file to see just what code gets generated from uic?

        privatepepperP Offline
        privatepepperP Offline
        privatepepper
        wrote on last edited by
        #3

        @JonB

        Thanks for the reply:), how could i check the ui_... generated code?

        JonBJ 1 Reply Last reply
        0
        • privatepepperP privatepepper

          @JonB

          Thanks for the reply:), how could i check the ui_... generated code?

          JonBJ Offline
          JonBJ Offline
          JonB
          wrote on last edited by JonB
          #4

          @privatepepper
          When you run the build, in your target directory (debug/release), where it puts the .o/.obj object files and the exe, for your file someclass.ui it (the uic program) generates a C++ file named ui_someclass.h. Open that from Qt Creator and you can see the code which has been generated.

          Otherwise, the standard document to read is https://doc.qt.io/qt-5/layout.html. Take the time to read though. At the end there are several example programs about layouts.

          privatepepperP 1 Reply Last reply
          1
          • JonBJ JonB

            @privatepepper
            When you run the build, in your target directory (debug/release), where it puts the .o/.obj object files and the exe, for your file someclass.ui it (the uic program) generates a C++ file named ui_someclass.h. Open that from Qt Creator and you can see the code which has been generated.

            Otherwise, the standard document to read is https://doc.qt.io/qt-5/layout.html. Take the time to read though. At the end there are several example programs about layouts.

            privatepepperP Offline
            privatepepperP Offline
            privatepepper
            wrote on last edited by
            #5

            @JonB

            Thank you so much:), you helped me a lot I found the ui_someclass.h code:)

            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