remove all unneeded module listed from Niklas
This commit is contained in:
1 parent
be912de9d6
commit
92ad7d4686
895 files changed
-327561
No files matched your search
@@ -1,37 +0,0 @@
|
||||
#include "textedit.h"
|
||||
|
||||
#include <QtWidgets/QApplication>
|
||||
#include <QCommandLineParser>
|
||||
#include <QCommandLineOption>
|
||||
#include <QScreen>
|
||||
#include <QtCore/QDebug>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
//Q_INIT_RESOURCE(textedit);
|
||||
|
||||
QApplication a(argc, argv);
|
||||
// QCoreApplication::setOrganizationName("QtProject");
|
||||
// QCoreApplication::setApplicationName("Rich Text");
|
||||
// QCoreApplication::setApplicationVersion(QT_VERSION_STR);
|
||||
|
||||
QCommandLineParser parser;
|
||||
parser.setApplicationDescription(QCoreApplication::applicationName());
|
||||
parser.addHelpOption();
|
||||
parser.addVersionOption();
|
||||
parser.addPositionalArgument(QStringLiteral("file"), QStringLiteral("The file to open."));
|
||||
parser.process(a);
|
||||
|
||||
TextEdit mw;
|
||||
|
||||
const QRect availableGeometry = mw.screen()->availableGeometry();
|
||||
mw.resize(availableGeometry.width() / 2, (availableGeometry.height() * 2) / 3);
|
||||
mw.move((availableGeometry.width() - mw.width()) / 2,
|
||||
(availableGeometry.height() - mw.height()) / 2);
|
||||
|
||||
if (!mw.load(parser.positionalArguments().value(0, QStringLiteral(":/example.html"))))
|
||||
mw.fileNew();
|
||||
|
||||
mw.show();
|
||||
return a.exec();
|
||||
}
|
||||
Reference in new issue
Block a user