[Qt-interest] RES: Replacing layout
Leonardo Bispo
leonardo.bispo at corp.orolix.com
Tue Dec 16 12:34:12 CET 2008
Hi,
QWidget Documentation:
void QWidget::setLayout ( QLayout * layout )
Sets the layout manager for this widget to layout.
If there already is a layout manager installed on this widget, QWidget won't let you install another. You must first delete the existing layout manager (returned by layout()) before you can call setLayout() with the new layout.
Example:
QVBoxLayout *layout = new QVBoxLayout;
layout->addWidget(lcd);
layout->addWidget(slider);
setLayout(layout);
An alternative to calling this function is to pass this widget to the layout's constructor.
The QWidget will take ownership of layout.
See also layout() and Layout Classes.
Best Regards,
Leonardo Bispo de Oliveira
Desenvolvimento de Sistemas - Analista Desenvolvedor
Tel: +55 11 5508 5887, +55 11 2122 0312
Fax: +55 11 5508 5880
http://www.orolix.com.br - leonardo.bispo at corp.orolix.com
Orolix. Você NAVEGA, a gente PAGA !!!
-----Mensagem original-----
De: qt-interest-bounces at trolltech.com em nome de NARCISO, Rui
Enviada: ter 16/12/2008 09:21
Para: Qt Interest (E-mail)
Assunto: [Qt-interest] Replacing layout
Hi
What's the procedure to replace a layout which I set as the main layout for my main window with a new one ?
>From the doc I read I need to first delete the existing one but no information on this is provided.
Any help is appreciated
Thanks
Rui
The information in this e-mail is confidential. The contents may not be disclosed or used by anyone other then the addressee. Access to this e-mail by anyone else is unauthorised.
If you are not the intended recipient, please notify Airbus immediately and delete this e-mail.
Airbus cannot accept any responsibility for the accuracy or completeness of this e-mail as it has been sent over public networks. If you have any concerns over the content of this message or its Accuracy or Integrity, please contact Airbus immediately.
All outgoing e-mails from Airbus are checked using regularly updated virus scanning software but you should take whatever measures you deem to be appropriate to ensure that this message and any attachments are virus free.
_______________________________________________
Qt-interest mailing list
Qt-interest at trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-interest
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20081216/20467cec/attachment.html
More information about the Qt-interest-old
mailing list