summaryrefslogtreecommitdiffstats
path: root/examples/widgets/widgets/stylesheet
diff options
context:
space:
mode:
Diffstat (limited to 'examples/widgets/widgets/stylesheet')
-rw-r--r--examples/widgets/widgets/stylesheet/mainwindow.cpp7
-rw-r--r--examples/widgets/widgets/stylesheet/mainwindow.h2
-rw-r--r--examples/widgets/widgets/stylesheet/stylesheeteditor.cpp4
-rw-r--r--examples/widgets/widgets/stylesheet/stylesheeteditor.h2
4 files changed, 8 insertions, 7 deletions
diff --git a/examples/widgets/widgets/stylesheet/mainwindow.cpp b/examples/widgets/widgets/stylesheet/mainwindow.cpp
index 9acd90658a..f187c007dd 100644
--- a/examples/widgets/widgets/stylesheet/mainwindow.cpp
+++ b/examples/widgets/widgets/stylesheet/mainwindow.cpp
@@ -53,7 +53,8 @@
#include "mainwindow.h"
#include "stylesheeteditor.h"
-MainWindow::MainWindow()
+MainWindow::MainWindow(QWidget *parent)
+ : QMainWindow(parent)
{
ui.setupUi(this);
@@ -63,8 +64,8 @@ MainWindow::MainWindow()
statusBar()->addWidget(new QLabel(tr("Ready")));
- connect(ui.exitAction, SIGNAL(triggered()), qApp, SLOT(quit()));
- connect(ui.aboutQtAction, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
+ connect(ui.exitAction, &QAction::triggered, qApp, &QApplication::quit);
+ connect(ui.aboutQtAction, &QAction::triggered, qApp, &QApplication::aboutQt);
}
void MainWindow::on_editStyleAction_triggered()
diff --git a/examples/widgets/widgets/stylesheet/mainwindow.h b/examples/widgets/widgets/stylesheet/mainwindow.h
index 46d3ecbb93..8af4c01da0 100644
--- a/examples/widgets/widgets/stylesheet/mainwindow.h
+++ b/examples/widgets/widgets/stylesheet/mainwindow.h
@@ -62,7 +62,7 @@ class MainWindow : public QMainWindow
Q_OBJECT
public:
- MainWindow();
+ MainWindow(QWidget *parent = nullptr);
private slots:
void on_editStyleAction_triggered();
diff --git a/examples/widgets/widgets/stylesheet/stylesheeteditor.cpp b/examples/widgets/widgets/stylesheet/stylesheeteditor.cpp
index 3247fa774d..0874cc3554 100644
--- a/examples/widgets/widgets/stylesheet/stylesheeteditor.cpp
+++ b/examples/widgets/widgets/stylesheet/stylesheeteditor.cpp
@@ -48,10 +48,10 @@
**
****************************************************************************/
-#include <QtWidgets>
-
#include "stylesheeteditor.h"
+#include <QtWidgets>
+
StyleSheetEditor::StyleSheetEditor(QWidget *parent)
: QDialog(parent)
{
diff --git a/examples/widgets/widgets/stylesheet/stylesheeteditor.h b/examples/widgets/widgets/stylesheet/stylesheeteditor.h
index 65a3018adb..f51af7877c 100644
--- a/examples/widgets/widgets/stylesheet/stylesheeteditor.h
+++ b/examples/widgets/widgets/stylesheet/stylesheeteditor.h
@@ -60,7 +60,7 @@ class StyleSheetEditor : public QDialog
Q_OBJECT
public:
- StyleSheetEditor(QWidget *parent = 0);
+ StyleSheetEditor(QWidget *parent = nullptr);
private slots:
void on_styleCombo_activated(const QString &styleName);