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. [solved] Basic layout question
Forum Updated to NodeBB v4.3 + New Features

[solved] Basic layout question

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

    If I got a very simple widget based application with just one button in the lower right corner, how can I tell the button to stay in the lower right position even if the window is resized.

    In C#/Windows Forms, iOS, OSX you would tell the widget (which is called view there) to stay glued to the next thing that is right next to and beneath it.

    In Qt there seems to be a complete different paradigm: layouts should be what I a looking for. But somehow I don't get the drift how to use layouts for this fairly simple task. I guess it's simple, my way just needs to be rewired for the new way of approaching layouts 8)
    And yes, I've used the Forum search and Mr. Google ;-)

    while(!sleep){++sheep;}

    1 Reply Last reply
    0
    • S Offline
      S Offline
      Sam
      wrote on last edited by
      #2

      If you are using Qt Designer

      1. Drag n Drop a pushButton to the form.
      2. Then drag n drop a horizontal spacer.
      3. Select the spacer and the pushButton
      4. Then from the toolbar at the top select horizontal layout.
      5. Then drag n drop a vertical spacer to the form.
      6. Select the vertical spacer and the layout that has horizontal spacer and pushButton
      7. Then from the toolbar set the layout as vertical.

      Here is the image :

      !http://img40.imageshack.us/img40/2562/capturepbd.png(layout)!

      You can check some "Video Tutorials":http://www.voidrealms.com/tutorials.aspx?filter=qt .

      1 Reply Last reply
      0
      • H Offline
        H Offline
        hardcodes.de
        wrote on last edited by
        #3

        Ah, thank you. As I though: not complicated, just another way of thinking :-)

        while(!sleep){++sheep;}

        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