Results 1 to 8 of 8

Thread: Add a layout in a QToolbar

  1. #1
    Join Date
    Nov 2007
    Location
    Italy
    Posts
    691
    Thanks
    59
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Add a layout in a QToolbar

    Hi,
    I would layout 4 controls in a grid and add it to the toolbar of my application but in the documentation I didn't find a addLayout, only a addWidget, so I would know how can I solve my problem.

    Thank you
    Franco Amato

  2. #2
    Join Date
    Apr 2010
    Posts
    769
    Thanks
    1
    Thanked 94 Times in 86 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: Add a layout in a QToolbar

    Go back and read the documentation again.

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Add a layout in a QToolbar

    Hint: what do you apply layouts on?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  4. #4
    Join Date
    Nov 2007
    Location
    Italy
    Posts
    691
    Thanks
    59
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default

    Quote Originally Posted by wysota View Post
    Hint: what do you apply layouts on?
    I would layout 2 QLabels and 2 QLeds

    (row 1, col 1) a label - ( row 1, col 2) a QLed
    (row 2, col 1) a label - ( row 2, col 2) a QLed

    and put all this in a QToolbar.

    Quote Originally Posted by SixDegrees View Post
    Go back and read the documentation again.
    Already read.
    Maybe does I need an oculist?
    Last edited by wysota; 15th October 2010 at 23:57.
    Franco Amato

  5. #5
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Add a layout in a QToolbar

    Quote Originally Posted by franco.amato View Post
    I would layout 2 QLabels and 2 QLeds

    (row 1, col 1) a label - ( row 1, col 2) a QLed
    (row 2, col 1) a label - ( row 2, col 2) a QLed

    and put all this in a QToolbar.
    What do you apply layouts on in general? Note, I'm not asking what you put into layouts.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  6. #6
    Join Date
    Nov 2007
    Location
    Italy
    Posts
    691
    Thanks
    59
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Add a layout in a QToolbar

    Quote Originally Posted by wysota View Post
    What do you apply layouts on in general? Note, I'm not asking what you put into layouts.
    In general I apply a layout on a QWidget right?
    Franco Amato

  7. #7
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

    Default Re: Add a layout in a QToolbar

    Quote Originally Posted by franco.amato View Post
    In general I apply a layout on a QWidget right?
    Yes, and what do you add to the toolbar? You already mentioned this in your first post.

  8. #8
    Join Date
    Nov 2007
    Location
    Italy
    Posts
    691
    Thanks
    59
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Add a layout in a QToolbar

    Quote Originally Posted by tbscope View Post
    Yes, and what do you add to the toolbar? You already mentioned this in your first post.
    Ok now is clear, I have to create such widget and add it to the toolbar,
    thank you
    Franco Amato

Similar Threads

  1. QToolBar Layout(when part of QMainWindow)
    By iridium in forum Qt Programming
    Replies: 3
    Last Post: 18th April 2013, 13:19
  2. Layout QActions in a QToolBar
    By parisiasl in forum Qt Programming
    Replies: 2
    Last Post: 12th March 2010, 13:40
  3. Widgets Layout in a QToolBar.
    By cydside in forum Qt Programming
    Replies: 1
    Last Post: 27th June 2009, 08:46
  4. Replies: 0
    Last Post: 25th May 2009, 10:00
  5. Replies: 7
    Last Post: 15th June 2007, 16:13

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.