Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 1

Qt-interest Archive, December 2007
Re: QT3 - QMainWindow Help - Not Showing Widgets


Message 1 in thread

I actually solved this problem by creating an interface widget, that
contained a left pane widget and a right pane widget, as well as the
splitter.

On Fri, 30 Nov 2007 11:24:58 -0500
Martin Irman <imartin@xxxxxxx> wrote:

> Cody Harris wrote:
> [...]
> > The problem I'm having is that the mainWindow class is showing up,
> > it's just not showing any contents.  I'm not sure if I'm missing a
> > call or what.
> [...]
> > mainWindow::mainWindow(QWidget *parent): QMainWindow(parent){
> > 	setCaption("Triplet");
> > 	QSplitter *split = new QSplitter();
> > 	leftPane *lpane = new leftPane(split);
> > 	rightPane *rpane = new rightPane(split);
> > 	setCentralWidget(split);
> > 	resize(300,500);
> > }
> 
> Your QSplitter widget does not have a parent. I'm not sure if 
> setCentralWidget() will re-parent it. Did you try explicitly
> parenting the splitter with the main window?
> 
> Martin.
> 
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx
> with "unsubscribe" in the subject or the body. List archive and
> information: http://lists.trolltech.com/qt-interest/


-- 
 [ signature omitted ] 

Attachment: signature.asc
Description: PGP signature