diff --git a/src/plugins/qmlprofiler/qmlprofileroptionspage.cpp b/src/plugins/qmlprofiler/qmlprofileroptionspage.cpp index 99ffc6f3ed9..ec433997d93 100644 --- a/src/plugins/qmlprofiler/qmlprofileroptionspage.cpp +++ b/src/plugins/qmlprofiler/qmlprofileroptionspage.cpp @@ -36,7 +36,7 @@ namespace QmlProfiler { namespace Internal { -QmlProfilerOptionsPage::QmlProfilerOptionsPage() +QmlProfilerOptionsPage::QmlProfilerOptionsPage() : m_widget(0) { setId(Constants::SETTINGS); setDisplayName(tr("QML Profiler")); @@ -52,8 +52,9 @@ QmlProfilerOptionsPage::~QmlProfilerOptionsPage() QWidget *QmlProfilerOptionsPage::widget() { + // We cannot parent the widget to the options page as it expects a QWidget as parent if (!m_widget) - m_widget = new QmlProfilerConfigWidget(QmlProfilerPlugin::globalSettings(), 0); + m_widget = new QmlProfilerConfigWidget(QmlProfilerPlugin::globalSettings()); return m_widget; }