Results 1 to 20 of 21

Thread: layout in widget give me an empty window!

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Apr 2012
    Posts
    101
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default layout in widget give me an empty window!

    Hi,
    i have Splitter and i make like that
    Qt Code:
    1. QVBoxLayout *mVerticalLayout;
    2. QSplitter *Splitter = new QSplitter(this);
    3. Splitter->setOrientation(Qt::Vertical);
    4. mVerticalLayout->addWidget(Splitter);
    5.  
    6. QRenderWindow *orw = new QRenderWindow(Splitter);
    7. mQRenderWindowList.append(orw);
    8. Splitter->addWidget(orw);
    To copy to clipboard, switch view to plain text mode 
    and that work very good
    But i want now add name of each Splitter( i want to see the name) for that i change the method and i use qgroubbox
    But that does not work
    i make like that

    Qt Code:
    1. QHBoxLayout *mVerticalLayout;
    2. QWidget *central = new QGroupBox("My Scene", this);
    3.  
    4.  
    5. QOgreRenderWindow *orw = new QOgreRenderWindow(central);
    6.  
    7. mVerticalLayout->addWidget(orw);
    8. central->setLayout(mVerticalLayout);
    To copy to clipboard, switch view to plain text mode 

    But that make to me an empty window
    Last edited by rimie23; 3rd June 2012 at 09:35.

Similar Threads

  1. put widget in layout
    By rimie23 in forum Qt Programming
    Replies: 5
    Last Post: 28th May 2012, 09:56
  2. mainwindow layout vs widget layout
    By fatecasino in forum Newbie
    Replies: 2
    Last Post: 14th December 2010, 14:45
  3. How to change a widget to other widget in layout?
    By Kevin Hoang in forum Qt Programming
    Replies: 2
    Last Post: 20th March 2010, 10:55
  4. Widget layout in GridLayout
    By Dato0011 in forum Qt Programming
    Replies: 8
    Last Post: 7th December 2009, 09:26
  5. Stacked Layout. & Widget.
    By csvivek in forum Qt Programming
    Replies: 1
    Last Post: 13th May 2008, 08:56

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.