jpn,
I finally got to your suggestion. And called dumpObject tree this way:
void cMainWindow::setupClockWidget()
{
clockDockWidget->setAllowedAreas(Qt::AllDockWidgetAreas);
mClockDlg = new cClockDlg(clockDockWidget);
clockDockWidget->setWidget(mClockDlg);
addDockWidget(Qt::TopDockWidgetArea, clockDockWidget);
clockDockWidget->dumpObjectTree();
} // cMainWindow::setupClockWidget
void cMainWindow::setupClockWidget()
{
QDockWidget * clockDockWidget = new QDockWidget(tr("Simulation Clock"), this);
clockDockWidget->setAllowedAreas(Qt::AllDockWidgetAreas);
mClockDlg = new cClockDlg(clockDockWidget);
clockDockWidget->setWidget(mClockDlg);
addDockWidget(Qt::TopDockWidgetArea, clockDockWidget);
clockDockWidget->dumpObjectTree();
} // cMainWindow::setupClockWidget
To copy to clipboard, switch view to plain text mode
And got this result:
[HTML]
QDockWidget::
QGridLayout::
QVBoxLayout::
QWidgetResizeHandler::
QAction::
QDockWidgetTitleButton::
QDockWidgetTitleButton::
cClockDlg::cClockDlg
QWidget::layoutWidget
QHBoxLayout::hboxLayout
QPushButton::mToStart
QPushButton::mReverseFast
QPushButton::mReverse
QPushButton::mPause
QPushButton::mForward
QPushButton::mForwardFast
QPushButton::mToEnd
QWidget::layoutWidget1
QHBoxLayout::hboxLayout1
QLabel::mTimeLabel
QTimeEdit::mTimeEdit
QLineEdit::qt_spinbox_lineedit
QAction::
QAction::
QAction::
QAction::
QAction::
QAction::
QAction::
QValidator::qt_spinboxvalidator
QScrollBar::mTimeScrollBar
[/HTML]
I think you're right in that it's a parenting issue, because I don't see any reference to the MainWindow in this heirarchy. I thought that "this" in this call:
QDockWidget * clockDockWidget = new QDockWidget(tr("Simulation Clock"), this);
To copy to clipboard, switch view to plain text mode
set up the reference to the main window.
Bookmarks