forked from qt-creator/qt-creator
QmlWizards: Unify templates
Unify the original qml file generated by Qt Quick UI / Qt Quick Application wizards. Use a default size of 360x360. Furthermore, add a MouseArea such that clicking on the app will close it (demonstrating the use of Qt.quit()). Reviewed-by: Alessandro Portale
This commit is contained in:
@@ -117,13 +117,18 @@ Core::GeneratedFiles QmlProjectApplicationWizard::generateFiles(const QWizard *w
|
||||
<< "import Qt 4.7" << endl
|
||||
<< endl
|
||||
<< "Rectangle {" << endl
|
||||
<< " width: 200" << endl
|
||||
<< " height: 200" << endl
|
||||
<< " width: 360" << endl
|
||||
<< " height: 360" << endl
|
||||
<< " Text {" << endl
|
||||
<< " x: 66" << endl
|
||||
<< " y: 93" << endl
|
||||
<< " anchors.centerIn: parent" << endl
|
||||
<< " text: \"Hello World\"" << endl
|
||||
<< " }" << endl
|
||||
<< " MouseArea {" << endl
|
||||
<< " anchors.fill: parent" << endl
|
||||
<< " onClicked: {" << endl
|
||||
<< " Qt.quit();" << endl
|
||||
<< " }" << endl
|
||||
<< " }" << endl
|
||||
<< "}" << endl;
|
||||
}
|
||||
Core::GeneratedFile generatedMainFile(mainFileName);
|
||||
|
||||
Reference in New Issue
Block a user