Results 1 to 3 of 3

Thread: [qt3]invisible toolbar

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    28
    Thanked 976 Times in 912 Posts

    Default Re: [qt3]invisible toolbar

    QMainWindow uses it's own layout, so you must use QMainWindow::setCentralWidget().

    Try this:
    Qt Code:
    1. dialog::dialog(QWidget *parent, const char *name) : QMainWindow(parent, name)
    2. {
    3. // ...
    4. QWidget *widget = new QWidget( this );
    5. QListBox *lista = new QListBox( widget );
    6. // ...
    7. QVBoxLayout *pionowy = new QVBoxLayout( widget );
    8. QHBoxLayout *poziomy = new QHBoxLayout( widget );
    9. // ...
    10. pionowy->addLayout( poziomy );
    11. setCentralWidget( widget );
    12. }
    To copy to clipboard, switch view to plain text mode 

  2. The following user says thank you to jacek for this useful post:

    lszk (26th February 2006)

Similar Threads

  1. Toolbar in dockwidget
    By AD in forum Qt Programming
    Replies: 7
    Last Post: 2nd October 2008, 14:34
  2. unable to hide combobox or spinbox in toolbar
    By Sandip in forum Qt Programming
    Replies: 1
    Last Post: 22nd July 2008, 11:52
  3. Create a Toolbar on a Subclassed Textedit?
    By c_07 in forum Qt Programming
    Replies: 5
    Last Post: 12th October 2007, 18:17
  4. Adding a toolbar to a TableWidget
    By Walter in forum Qt Programming
    Replies: 2
    Last Post: 1st July 2007, 21:13
  5. Initialise toolbar in a different area
    By georgie in forum Qt Programming
    Replies: 4
    Last Post: 4th May 2006, 03:49

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
  •  
Qt is a trademark of The Qt Company.