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. Rapid UI design - tip and trick
Forum Updated to NodeBB v4.3 + New Features

Rapid UI design - tip and trick

Scheduled Pinned Locked Moved General and Desktop
4 Posts 4 Posters 2.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.
  • M Offline
    M Offline
    moravas
    wrote on last edited by
    #1

    Hi People,

    I would like to know some trick for design an rapid and beautiful UI. The most important for me is the automate alignment between the widgets and the main window.
    I work on the design view of the QtCreator and I have a MainWindow object. On it is an TabWidget and I would like take a PushButton on the fist tab. How can I set the Button to it stays every time on the right button corne of the MainWindow. I don't like to use the signals of MainWindow.

    Regards,
    Norbert

    u.i.: sorry for my english :(

    1 Reply Last reply
    0
    • C Offline
      C Offline
      Code_ReaQtor
      wrote on last edited by
      #2

      Using "layouts" is very straightforward. This "link":http://qt-project.org/doc/qt-4.8/designer-layouts.html will guide you.

      Please visit my open-source projects at https://github.com/Code-ReaQtor.

      1 Reply Last reply
      0
      • Chris KawaC Offline
        Chris KawaC Offline
        Chris Kawa
        Lifetime Qt Champion
        wrote on last edited by
        #3

        All placement can be done with "layouts":http://doc.qt.digia.com/4.7/designer-layouts.html and spacers.

        Example:
        !http://img266.imageshack.us/img266/5715/layoutvv.jpg(layout example)!

        Notice the grid layouts (little blue grid icon) set inside the main window and the tab.

        1 Reply Last reply
        0
        • B Offline
          B Offline
          Batox
          wrote on last edited by
          #4

          The biggest hurdle when starting to use the creator is to understand how Qt Layouts work. Layouts have an effect only on things inside them, never to the outside. So when you put 3 widgets in your main window and join them with a horizontal layout, they are arranged in a neat horizontal line, but nothing else. The group of three widgets is "loose" in the main window.

          In order to put them in relation to the main window, you need a second layout, the "master layout" for the main window. In order to produce that, you select the window (that is some piece of background behind your three widgets) and then chose one of the layouts from the toolbar.

          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