Details
-
Bug
-
Resolution: Cannot Reproduce
-
Not Evaluated
-
None
-
4.7.0, 4.7.1, 4.7.2, 4.7.3, 4.7.4, 4.8.0, 5.4.2
-
None
Description
The bug in backingstore_p.h
inline void QWidgetBackingStore::updateStaticContentsSize() { for (int i = 0; i < staticWidgets.size(); ++i) { QWidgetPrivate *wd = staticWidgets.at(i)->d_func(); > if (!wd->extra) wd->createExtra(); wd->extra->staticContentsSize = wd->data.crect.size(); } }
After this code:
class MainWindow: public QMainWindow { Q_OBJECT public: MainWindow(){ QDockWidget *dock=new QDockWidget(this); { view=new QWidget(dock); view->setAttribute(Qt::WA_StaticContents,true); dock->setWidget(view); } dock->setFloating(true); } public slots: void bug() { QMessageBox::information(this,"Don't doit!","Ok"); delete view; } protected: QWidget *view; }; #include "main.moc" int main(int argc, char *argv[]) { QApplication a(argc, argv); MainWindow *w=new MainWindow(); w->show(); w->bug(); return a.exec(); }
wd is undefined!
Attachments
Issue Links
- relates to
-
QTBUG-18165 Application crash in connection with Qt::StaticContents and Qt::WA_StaticContents
- Closed