summaryrefslogtreecommitdiffstats
path: root/examples/widgets/mainwindows/sdi/main.cpp
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2023-03-01 14:56:34 +0100
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2023-03-02 12:08:11 +0100
commit3c104c279911419f3d0a9e6f3ac050e6f3968e7e (patch)
treeecd48d188ee4cce2baf641407e41642ccfe22ce2 /examples/widgets/mainwindows/sdi/main.cpp
parent277d809ba4f8c60812286f15a116d2520e2eb0fc (diff)
Remove the 'sdi' example
It is essentially the same as the other mainwindow examples, showing how to create a text editor. The only special code here is the tiling of the different main windows, which - without any documentation or explanation - is neither very helpful, nor relevant in 2023. Pick-to: 6.5 Change-Id: I48b92b1cf057f586e0d2842d1c0a3312154e9a13 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Diffstat (limited to 'examples/widgets/mainwindows/sdi/main.cpp')
-rw-r--r--examples/widgets/mainwindows/sdi/main.cpp37
1 files changed, 0 insertions, 37 deletions
diff --git a/examples/widgets/mainwindows/sdi/main.cpp b/examples/widgets/mainwindows/sdi/main.cpp
deleted file mode 100644
index 139bc45690..0000000000
--- a/examples/widgets/mainwindows/sdi/main.cpp
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-
-#include <QApplication>
-#include <QCommandLineParser>
-
-#include "mainwindow.h"
-
-int main(int argc, char *argv[])
-{
- Q_INIT_RESOURCE(sdi);
- QApplication app(argc, argv);
- QCoreApplication::setApplicationName("SDI Example");
- QCoreApplication::setOrganizationName("QtProject");
- QCoreApplication::setApplicationVersion(QT_VERSION_STR);
- QCommandLineParser parser;
- parser.setApplicationDescription(QCoreApplication::applicationName());
- parser.addHelpOption();
- parser.addVersionOption();
- parser.addPositionalArgument("file", "The file(s) to open.");
- parser.process(app);
-
- MainWindow *mainWin = nullptr;
- const QStringList posArgs = parser.positionalArguments();
- for (const QString &file : posArgs) {
- MainWindow *newWin = new MainWindow(file);
- newWin->tile(mainWin);
- newWin->show();
- mainWin = newWin;
- }
-
- if (!mainWin)
- mainWin = new MainWindow;
- mainWin->show();
-
- return app.exec();
-}