Results 1 to 3 of 3

Thread: QToolBar

  1. #1
    Join Date
    Oct 2007
    Posts
    78
    Thanks
    1
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default QToolBar

    I know I have seen this before but could not find it with a search.

    QMainWindow has addtoolBar for adding toolbars to it.

    Is there any way to add a toolbar to a QDialog or any other widget?

    Bob

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: QToolBar

    QToolBar is a QWidget so basically you can put it anywhere you want. But QMainWindow is the only class capable of handling it like one (with moving functionality and such). Notice that against common misbelief, QMainWindow is not limited to one instance per application.
    J-P Nurmi

  3. #3
    Join Date
    Oct 2007
    Posts
    78
    Thanks
    1
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QToolBar

    Thanks jpn,

    I was pondering the use of just using multiple QMainWindows but was not sure if it was exactly "allowed".

    After testing I noticed I cannot dock and move toolbars between the mainwindows which is a good thing for my purpose. My question at this point is multiple QMianWindows just a quirk or is using QMainWindow in this way going to remain valid?

    Bob

Similar Threads

  1. QToolBar location changed
    By OriginalCopy in forum Qt Programming
    Replies: 3
    Last Post: 3rd November 2007, 11:17
  2. Various icon sizes for QToolButtons on QToolbar
    By Erlendhg in forum Qt Programming
    Replies: 4
    Last Post: 30th June 2007, 18:35
  3. How Do I Float a QToolBar?
    By dvmorris in forum Qt Programming
    Replies: 7
    Last Post: 29th April 2007, 19:01
  4. QToolBar in a new UI form?
    By gfunk in forum Qt Tools
    Replies: 7
    Last Post: 2nd June 2006, 11:19
  5. Insert separate QToolBar into QMainWindow
    By YuriyRusinov in forum Qt Programming
    Replies: 3
    Last Post: 24th April 2006, 10:37

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.