Programming/qt
QT Quick UI
구차니
2014. 11. 5. 16:12
요약 : Quick UI는 qml 이라는 문서를 통해 GUI가 생성된다.
심심(?)해서 Qt Widgets Application 대신 QT Quick UI를 해서 프로젝트를 생성하니
심심(?)해서 Qt Widgets Application 대신 QT Quick UI를 해서 프로젝트를 생성하니
QT Creator 에서 복사하니 이렇게 코드가 컬러풀 하게 붙여지네 ㄷㄷ
import QtQuick 2.3import QtQuick.Controls 1.2 import QtQuick.Window 2.2 ApplicationWindow { title: qsTr("Hello World") width: 640 height: 480 menuBar: MenuBar { Menu { title: qsTr("File") MenuItem { text: qsTr("&Open") onTriggered: console.log("Open action triggered"); } MenuItem { text: qsTr("Exit") onTriggered: Qt.quit(); } } } Button { text: qsTr("Hello World") anchors.horizontalCenter: parent.horizontalCenter anchors.verticalCenter: parent.verticalCenter } } |
이렇게 나온다 ㄷㄷ