from central widget to it parent; refs #167

master
Marc Wäckerlin 12 years ago
parent 997e2b37b3
commit 616a6bde2e
  1. 2
      src/qbrowserlib/swisswebwidget.hxx

@ -31,7 +31,7 @@ namespace qbrowserlib {
public: public:
SwissWebWidget(QWidget* p=0): QWidget(p) { SwissWebWidget(QWidget* p=0): QWidget(p) {
setupUi(this); setupUi(this);
QMainWindow* w(qobject_cast<QMainWindow*>(p)); QMainWindow* w(qobject_cast<QMainWindow*>(p?p->parentWidget():p));
qDebug()<<"Parent "<<p<<(w?"is":"is not")<<" a QMainWindow"; qDebug()<<"Parent "<<p<<(w?"is":"is not")<<" a QMainWindow";
if (w) { if (w) {
/*! Within a QMainWindow, the widget automatically reparents /*! Within a QMainWindow, the widget automatically reparents

Loading…
Cancel
Save