[Qt-interest] How to get a widget's ownership and show it inanother widget?

Kermit Mei kermit.mei at gmail.com
Mon Jun 8 07:23:23 CEST 2009


On Sun, 2009-06-07 at 21:34 -0700, Scott Aron Bloom wrote:
> Just create a new QWidget derived class, create a layout that you need,
> and a setCentralWidget method that adds it to the layout for you..
> 
> Scott

Thank you:) That's elegant!
> 
> -----Original Message-----
> From: qt-interest-bounces at trolltech.com
> [mailto:qt-interest-bounces at trolltech.com] On Behalf Of Kermit Mei
> Sent: Sunday, June 07, 2009 8:26 PM
> To: qt-interest at trolltech.com
> Subject: [Qt-interest] How to get a widget's ownership and show it
> inanother widget?
> 
> Hello, I want to implement a MainWindow Widget which is inherited from
> QWidget. And I need a mothed MainWindow::setCentralWidget(QWidget
> *widget) which works like QMainWindow::setCentralWidget(...) do.
> 
> I can't us QMainWindow's method, because I need some more adjust.And I 
> can not use QStackWidget, too. 
> 
> Can anyone help me tell me how to do it?
> 
> BTW: How can I hide a QMainWindow's Title bar?
> 
> Thanks!
> Kermit





More information about the Qt-interest-old mailing list