From 3c104c279911419f3d0a9e6f3ac050e6f3968e7e Mon Sep 17 00:00:00 2001 From: Volker Hilsheimer Date: Wed, 1 Mar 2023 14:56:34 +0100 Subject: 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 --- examples/widgets/mainwindows/sdi/main.cpp | 37 ------------------------------- 1 file changed, 37 deletions(-) delete mode 100644 examples/widgets/mainwindows/sdi/main.cpp (limited to 'examples/widgets/mainwindows/sdi/main.cpp') 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 -#include - -#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(); -} -- cgit v1.2.3