[Qt-interest] accessint QDialog::accept() slot from dynamic layout
S. Aguinaga
sa_jr at yahoo.com
Wed Aug 19 14:19:18 CEST 2009
Dear Fellows,
Dynamic layout can't get access to accept() slot when I use QFormLayout w/in my window.
I'm using the "borderlayout" from Qt examples (where I have a north layout, south, east, west layout ect). The central layout is dynamic and when I add to it a QFormLayout, it returns an error message that CentralPageLayout::QDialog::accept() is not available.
class CentralPageLayout : public QWidget
>{
> Q_OBJECT
>...
>}
It displays the layout, but it returns the error msg. On the other hand, if I inherit QDialog instead of QWidget, then it doesn't display any of the layout.
class CentralPageLayout : public QDialog
>{
> Q_OBJECT
>...
>};
This is called from a main window class defined as:
HomeWindow::HomeWindow(const QString xperimenter, QWidget *parent )
> : QWidget(parent)
>{
>>CentralPageLayout *centralPageWidget = new CentralPageLayout(this);
>>
>>/* Setup Layout */
>>BorderLayout *layout = new BorderLayout;
>>layout->addWidget( centralPageWidget, BorderLayout::Center);
>>layout->addWidget( northWidget, BorderLayout::North);
>>layout->addWidget( southWidget, BorderLayout::South);
>>setLayout(layout);
>
>>
>...
>}
So I'm wondering why HomeWindow does not display my layout if CentralPageLayout is defined by inheriting QDialog?
// Sal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090819/63505e07/attachment.html
More information about the Qt-interest-old
mailing list