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. Changing Positions and Sizes of GUIs in code?
Forum Updated to NodeBB v4.3 + New Features

Changing Positions and Sizes of GUIs in code?

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 2.2k 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.
  • F Offline
    F Offline
    Flurite
    wrote on last edited by
    #1

    I'm sorry if this question is obvious or easy to find, but I'm new to C++/Qt.

    Could somebody tell me how you would change the position and size of a GUI in code?

    1 Reply Last reply
    0
    • ? This user is from outside of this forum
      ? This user is from outside of this forum
      Guest
      wrote on last edited by
      #2

      http://developer.qt.nokia.com/doc/qt-4.8/QWidget.html

      There is a wide range of setter methods to control the size of GUI elements, depending on your needs, for both absolute size and relative size policy.

      As for position, you would typically want to use layouts to position (as well as scale) your widgets. Absolute positioning is kind of... last century and very static - resizing your window will break your interface.

      1 Reply Last reply
      0
      • B Offline
        B Offline
        Blizzard
        wrote on last edited by
        #3

        You may want to take a look at "this thread":http://developer.qt.nokia.com/forums/viewthread/14814/.

        Software Engineer | Aerospace & Defence

        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