I’m creating a window with QML and the code below. How can I set a min-width for the window so that I can’t resize less than the values I define?
Rectangle {
color: red;
width: 300
height: 100
}
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QDeclarativeView view;
view.setSource(QUrl::fromLocalFile("QML/main.qml"));
view.setResizeMode(QDeclarativeView::SizeRootObjectToView);
view.show();
return app.exec();
}
1 Answer