[Solved]How can I get a window without MaximizeButton using QtQuick2ApplicationViewer ?
-
I created a simple project with Qt Quick 2 Application. The main.cpp as follow:
@int main(int argc, char *argv[])
{
QGuiApplication app(argc, argv);
QtQuick2ApplicationViewer viewer;
viewer.setMainQmlFile(QStringLiteral("qml/test/main.qml"));
viewer.show();
return app.exec();
}
@I want to make the appwindow without MaximizeButton and MinimumButton. But the WindowMaximizeButtonHint can't to be used. What should I do ?
Thanks! -
-
Dear dasun, Thank you! I solved the problem reference to your answer. The code like this:
@
int main(int argc, char *argv[])
{
QGuiApplication app(argc, argv);
QtQuick2ApplicationViewer viewer;
viewer.setMainQmlFile(QStringLiteral("qml/test/main.qml"));
viewer.setResizeMode(QtQuick2ApplicationViewer::SizeViewToRootObject);
viewer.show();
viewer.setFlags(Qt::Dialog);
return app.exec();
}
@I'm sorry. I don't know how to mark the "viewer.setFlags(Qt::Dialog)" with red.
And how to make the title to solved?