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] QToolBar custom position
Forum Updated to NodeBB v4.3 + New Features

[SOLVED] QToolBar custom position

Scheduled Pinned Locked Moved General and Desktop
4 Posts 3 Posters 1.9k 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.
  • U Offline
    U Offline
    UndeadBlow
    wrote on 16 Jan 2015, 12:03 last edited by
    #1

    Hello. I need to configure two toolbars in such way as on photoshoped picture below:
    !http://pastexen.com/i/2UfuvWQz6U.png!
    but I can't set position right, because toolbars always run away to their areas. How can I configure them?

    1 Reply Last reply
    0
    • R Offline
      R Offline
      raven-worx
      Moderators
      wrote on 16 Jan 2015, 12:21 last edited by
      #2

      QToolBar's can only be moved around by the user inside the QMainWindow they belong to.
      If you need to position them anywhere inside you layout you need to add a QMainWindow as a child to your layout.

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      1 Reply Last reply
      0
      • A Offline
        A Offline
        andre
        wrote on 16 Jan 2015, 12:53 last edited by
        #3

        You can also just add a QToolBar widget directly on your widget. Just not from Designer. QToolBar is just a widget, and it can be placed in a layout like any other widget*.

        *) Well, mac... I don't know.

        1 Reply Last reply
        0
        • U Offline
          U Offline
          UndeadBlow
          wrote on 16 Jan 2015, 19:12 last edited by
          #4

          [quote author="Andre" date="1421412821"]You can also just add a QToolBar widget directly on your widget. Just not from Designer. QToolBar is just a widget, and it can be placed in a layout like any other widget*.

          *) Well, mac... I don't know.[/quote]
          Yep, you are right, I did it as I want, thank you.

          1 Reply Last reply
          0

          1/4

          16 Jan 2015, 12:03

          • Login

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