| 583 | } |
| 584 | |
| 585 | void MainWindow::applyStyle(QStyle *style) |
| 586 | { |
| 587 | qDebug() << "Using" << style << "style"; |
| 588 | |
| 589 | // note: do not set this as parent of default style |
| 590 | // this will cause the style being deleted too early through ~QObject() |
| 591 | // other objects (e.g. the script engine debugger) still might have a |
| 592 | // reference on the style during destruction |
| 593 | style->setParent(QCoreApplication::instance()); |
| 594 | |
| 595 | // unfortunately, setting the style is not recursive by default, unless we have a style sheet set |
| 596 | setStyleSheet(QStringLiteral("I_DONT_EXIST {}")); |
| 597 | setStyle(style); |
| 598 | } |
| 599 | |
| 600 | QWidget *MainWindow::createErrorPage(const QModelIndex &index) |
| 601 | { |