From 7f797ff9c33411866af0cac0848807337d876202 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20W=C3=A4ckerlin?= Date: Thu, 8 Nov 2012 13:49:15 +0000 Subject: [PATCH] next try; refs #167 --- src/qbrowserlib/swisswebwidget.hxx | 10 ++++++++-- src/qbrowserlib/swisswebwidget.ui | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/qbrowserlib/swisswebwidget.hxx b/src/qbrowserlib/swisswebwidget.hxx index 0588e43..baaaacf 100644 --- a/src/qbrowserlib/swisswebwidget.hxx +++ b/src/qbrowserlib/swisswebwidget.hxx @@ -40,13 +40,19 @@ namespace qbrowserlib { qDebug()<<"Rearranging"; QToolBar* t(w->addToolBar(trUtf8("Browser Tools", "name of the browser's toolbar"))); - _tools->setParent(t); + for (int i(_tools->count()); i>0;) { + qDebug()<<"Rearranging tool item "<<(i-1)<<_tools->itemAt(i-1); + t->addWidget(_statusbar->itemAt(--i)->widget()); + } + delete _tools; _tools=0; t->show(); _statusbar->removeWidget(_status); + delete _status; _status=0; for (int i(_statusbar->count()); i>0;) { - qDebug()<<"Rearranging item "<<(i-1)<<_statusbar->itemAt(i-1); + qDebug()<<"Rearranging stat item "<<(i-1)<<_statusbar->itemAt(i-1); w->statusBar()->addWidget(_statusbar->itemAt(--i)->widget()); } + delete _statusbar; _statusbar=0; } } protected: diff --git a/src/qbrowserlib/swisswebwidget.ui b/src/qbrowserlib/swisswebwidget.ui index 2b43840..d9ac45b 100644 --- a/src/qbrowserlib/swisswebwidget.ui +++ b/src/qbrowserlib/swisswebwidget.ui @@ -113,7 +113,7 @@ - +