diff --git a/examples/widgets/mainwindows/mdi/main.cpp b/examples/widgets/mainwindows/mdi/main.cpp
index 5976c85..ccb5f1c 100644
--- a/examples/widgets/mainwindows/mdi/main.cpp
+++ b/examples/widgets/mainwindows/mdi/main.cpp
@@ -54,10 +54,14 @@ int main(int argc, char *argv[])
     parser.setApplicationDescription("Qt MDI Example");
     parser.addHelpOption();
     parser.addVersionOption();
+    QCommandLineOption themeOpt("t","Do not use theme icons");
+    parser.addOption(themeOpt);
     parser.addPositionalArgument("file", "The file to open.");
     parser.process(app);
 
+    MainWindow::useThemeIcons = !parser.isSet(themeOpt);
     MainWindow mainWin;
+
     foreach (const QString &fileName, parser.positionalArguments())
         mainWin.openFile(fileName);
     mainWin.show();
diff --git a/examples/widgets/mainwindows/mdi/mainwindow.cpp b/examples/widgets/mainwindows/mdi/mainwindow.cpp
index 83ffbf6..8ecc423 100644
--- a/examples/widgets/mainwindows/mdi/mainwindow.cpp
+++ b/examples/widgets/mainwindows/mdi/mainwindow.cpp
@@ -63,7 +63,6 @@ MainWindow::MainWindow()
 
     readSettings();
 
-    setWindowTitle(tr("MDI"));
     setUnifiedTitleAndToolBarOnMac(true);
 }
 
@@ -224,19 +223,34 @@ MdiChild *MainWindow::createMdiChild()
     return child;
 }
 
+static QIcon getIcon(const QString &themeName, const QString &fallbackName,
+                     bool useTheme)
+{
+    const QIcon fallback(fallbackName);
+    return useTheme ? QIcon::fromTheme(themeName, fallback) : fallback;
+}
+
+bool MainWindow::useThemeIcons = true;
+
 void MainWindow::createActions()
 {
-    newAct = new QAction(QIcon(":/images/new.png"), tr("&New"), this);
+
+    setWindowTitle(QLatin1String(QT_VERSION_STR) + (useThemeIcons ? " Theme" : " Qt"));
+
+    newAct = new QAction(getIcon("document-new", ":/images/new.png", useThemeIcons),
+                         tr("&New"), this);
     newAct->setShortcuts(QKeySequence::New);
     newAct->setStatusTip(tr("Create a new file"));
     connect(newAct, SIGNAL(triggered()), this, SLOT(newFile()));
 
-    openAct = new QAction(QIcon(":/images/open.png"), tr("&Open..."), this);
+    openAct = new QAction(getIcon("document-open", ":/images/open.png", useThemeIcons),
+                          tr("&Open..."), this);
     openAct->setShortcuts(QKeySequence::Open);
     openAct->setStatusTip(tr("Open an existing file"));
     connect(openAct, SIGNAL(triggered()), this, SLOT(open()));
 
-    saveAct = new QAction(QIcon(":/images/save.png"), tr("&Save"), this);
+    saveAct = new QAction(getIcon("document-save", ":/images/save.png", useThemeIcons),
+                          tr("&Save"), this);
     saveAct->setShortcuts(QKeySequence::Save);
     saveAct->setStatusTip(tr("Save the document to disk"));
     connect(saveAct, SIGNAL(triggered()), this, SLOT(save()));
@@ -254,19 +268,22 @@ void MainWindow::createActions()
 //! [0]
 
 #ifndef QT_NO_CLIPBOARD
-    cutAct = new QAction(QIcon(":/images/cut.png"), tr("Cu&t"), this);
+    cutAct = new QAction(getIcon("edit-cut", ":/images/cut.png", useThemeIcons),
+                         tr("Cu&t"), this);
     cutAct->setShortcuts(QKeySequence::Cut);
     cutAct->setStatusTip(tr("Cut the current selection's contents to the "
                             "clipboard"));
     connect(cutAct, SIGNAL(triggered()), this, SLOT(cut()));
 
-    copyAct = new QAction(QIcon(":/images/copy.png"), tr("&Copy"), this);
+    copyAct = new QAction(getIcon("edit-copy", ":/images/copy.png", useThemeIcons),
+                          tr("&Copy"), this);
     copyAct->setShortcuts(QKeySequence::Copy);
     copyAct->setStatusTip(tr("Copy the current selection's contents to the "
                              "clipboard"));
     connect(copyAct, SIGNAL(triggered()), this, SLOT(copy()));
 
-    pasteAct = new QAction(QIcon(":/images/paste.png"), tr("&Paste"), this);
+    pasteAct = new QAction(getIcon("edit-paste", ":/images/paste.png", useThemeIcons),
+                           tr("&Paste"), this);
     pasteAct->setShortcuts(QKeySequence::Paste);
     pasteAct->setStatusTip(tr("Paste the clipboard's contents into the current "
                               "selection"));
diff --git a/examples/widgets/mainwindows/mdi/mainwindow.h b/examples/widgets/mainwindows/mdi/mainwindow.h
index fa8e013..3b6228d 100644
--- a/examples/widgets/mainwindows/mdi/mainwindow.h
+++ b/examples/widgets/mainwindows/mdi/mainwindow.h
@@ -61,6 +61,8 @@ public:
 
     bool openFile(const QString &fileName);
 
+    static bool useThemeIcons;
+
 protected:
     void closeEvent(QCloseEvent *event) Q_DECL_OVERRIDE;
 
