//=============================================== int main(int argc, char** argv) { QApplication lApp(argc, argv); GWindow* lWindow = new GWindow; lWindow->show(); return lApp.exec(); } //=============================================== GWindow::GWindow(QWidget *parent) : QMainWindow(parent) , ui(new Ui::GWindow) { ui->setupUi(this); } //===============================================
//=============================================== int main(int argc, char** argv) { QApplication lApp(argc, argv); GWindow* lWindow = new GWindow; lWindow->show(); return lApp.exec(); } //=============================================== GWindow::GWindow(QWidget *parent) : QMainWindow(parent) , ui(new Ui::GWindow) { ui->setupUi(this); } //=============================================== void GWindow::on_actionOpen_triggered(bool checked) { qDebug() << __PRETTY_FUNCTION__; } //===============================================
//=============================================== void GWindow::on_actionOpen_triggered(bool checked) { GGraphicsView* lGraphicsView = new GGraphicsView; lGraphicsView->show(); } //=============================================== GGraphicsView::GGraphicsView(QWidget *parent) : QMainWindow(parent) , ui(new Ui::GGraphicsView) { ui->setupUi(this); setAttribute(Qt::WA_DeleteOnClose); m_scene = new QGraphicsScene(this); ui->graphicsView->setScene(m_scene); } //===============================================
//=============================================== void GWindow::on_actionOpen_triggered(bool checked) { GGraphicsView* lGraphicsView = new GGraphicsView; lGraphicsView->show(); } //=============================================== GGraphicsView::GGraphicsView(QWidget *parent) : QMainWindow(parent) , ui(new Ui::GGraphicsView) { ui->setupUi(this); setAttribute(Qt::WA_DeleteOnClose); m_scene = new QGraphicsScene(this); ui->graphicsView->setScene(m_scene); m_scene->setSceneRect(-50, -50, 120, 120); QPen pen = QPen(Qt::red); m_scene->addRect(m_scene->sceneRect(), pen); } //===============================================
//=============================================== void GWindow::on_actionOpen_triggered(bool checked) { GGraphicsView* lGraphicsView = new GGraphicsView; lGraphicsView->show(); } //=============================================== GGraphicsView::GGraphicsView(QWidget *parent) : QMainWindow(parent) , ui(new Ui::GGraphicsView) { ui->setupUi(this); setAttribute(Qt::WA_DeleteOnClose); m_scene = new QGraphicsScene(this); ui->graphicsView->setScene(m_scene); m_scene->setSceneRect(-50, -50, 120, 120); QPen pen = QPen(Qt::red); m_scene->addRect(m_scene->sceneRect(), pen); QGraphicsSimpleTextItem* lText = new QGraphicsSimpleTextItem("Qt Mobile"); m_scene->addItem(lText); } //===============================================
//=============================================== void GWindow::on_actionOpen_triggered(bool checked) { GGraphicsView* lGraphicsView = new GGraphicsView; lGraphicsView->show(); } //=============================================== GGraphicsView::GGraphicsView(QWidget *parent) : QMainWindow(parent) , ui(new Ui::GGraphicsView) { ui->setupUi(this); setAttribute(Qt::WA_DeleteOnClose); m_scene = new QGraphicsScene(this); ui->graphicsView->setScene(m_scene); m_scene->setSceneRect(-50, -50, 120, 120); QPen pen = QPen(Qt::red); m_scene->addRect(m_scene->sceneRect(), pen); QGraphicsSimpleTextItem* lText = new QGraphicsSimpleTextItem("Qt Mobile"); lText->setFlags(QGraphicsSimpleTextItem::ItemIsMovable); m_scene->addItem(lText); } //===============================================
//=============================================== void GWindow::on_actionOpen_triggered(bool checked) { GGraphicsView* lGraphicsView = new GGraphicsView; lGraphicsView->show(); } //=============================================== GGraphicsView::GGraphicsView(QWidget *parent) : QMainWindow(parent) , ui(new Ui::GGraphicsView) { ui->setupUi(this); setAttribute(Qt::WA_DeleteOnClose); m_scene = new QGraphicsScene(this); ui->graphicsView->setScene(m_scene); m_scene->setSceneRect(-50, -50, 120, 120); QPen pen = QPen(Qt::red); m_scene->addRect(m_scene->sceneRect(), pen); GTextGraphic* lText = new GTextGraphic("Qt Mobile"); lText->setFlags(QGraphicsSimpleTextItem::ItemIsMovable); m_scene->addItem(lText); } //=============================================== GTextGraphic::GTextGraphic(const QString& _text) : QGraphicsSimpleTextItem(_text) , m_text(_text) { } //=============================================== void GTextGraphic::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) { if (scene()->collidingItems(this).isEmpty()) QGraphicsSimpleTextItem::setText("BOOM!"); else QGraphicsSimpleTextItem::setText(m_text); QGraphicsSimpleTextItem::paint(painter, option, widget); } //===============================================
//=============================================== void GWindow::on_actionOpen_triggered(bool checked) { GGraphicsView* lGraphicsView = new GGraphicsView; lGraphicsView->show(); } //=============================================== GGraphicsView::GGraphicsView(QWidget *parent) : QMainWindow(parent) , ui(new Ui::GGraphicsView) { ui->setupUi(this); setAttribute(Qt::WA_DeleteOnClose); m_scene = new QGraphicsScene(this); ui->graphicsView->setScene(m_scene); } //===============================================
//=============================================== void GWindow::on_actionOpen_triggered(bool checked) { GGraphicsView* lGraphicsView = new GGraphicsView; lGraphicsView->show(); } //=============================================== GGraphicsView::GGraphicsView(QWidget *parent) : QMainWindow(parent) , ui(new Ui::GGraphicsView) { ui->setupUi(this); setAttribute(Qt::WA_DeleteOnClose); m_scene = new QGraphicsScene(this); ui->graphicsView->setScene(m_scene); m_scene->setSceneRect(-50, -50, 120, 120); QPen pen = QPen(Qt::red); m_scene->addRect(m_scene->sceneRect(), pen); } //===============================================
//=============================================== void GWindow::on_actionOpen_triggered(bool checked) { GGraphicsView* lGraphicsView = new GGraphicsView; lGraphicsView->show(); } //=============================================== GGraphicsView::GGraphicsView(QWidget *parent) : QMainWindow(parent) , ui(new Ui::GGraphicsView) { ui->setupUi(this); setAttribute(Qt::WA_DeleteOnClose); m_scene = new QGraphicsScene(this); ui->graphicsView->setScene(m_scene); m_scene->setSceneRect(-50, -50, 120, 120); QPen pen = QPen(Qt::red); m_scene->addRect(m_scene->sceneRect(), pen); QGraphicsSimpleTextItem* lText = new QGraphicsSimpleTextItem("Qt Mobile"); m_scene->addItem(lText); } //===============================================
//=============================================== void GWindow::on_actionOpen_triggered(bool checked) { GGraphicsView* lGraphicsView = new GGraphicsView; lGraphicsView->show(); } //=============================================== GGraphicsView::GGraphicsView(QWidget *parent) : QMainWindow(parent) , ui(new Ui::GGraphicsView) { ui->setupUi(this); setAttribute(Qt::WA_DeleteOnClose); m_scene = new QGraphicsScene(this); ui->graphicsView->setScene(m_scene); m_scene->setSceneRect(-50, -50, 120, 120); QPen pen = QPen(Qt::red); m_scene->addRect(m_scene->sceneRect(), pen); QGraphicsSimpleTextItem* lText = new QGraphicsSimpleTextItem("Qt Mobile"); lText->setFlags(QGraphicsSimpleTextItem::ItemIsMovable); m_scene->addItem(lText); } //===============================================
//=============================================== void GWindow::on_actionOpen_triggered(bool checked) { GGraphicsView* lGraphicsView = new GGraphicsView; lGraphicsView->show(); } //=============================================== GGraphicsView::GGraphicsView(QWidget *parent) : QMainWindow(parent) , ui(new Ui::GGraphicsView) { ui->setupUi(this); setAttribute(Qt::WA_DeleteOnClose); m_scene = new QGraphicsScene(this); ui->graphicsView->setScene(m_scene); m_scene->setSceneRect(-50, -50, 120, 120); QPen pen = QPen(Qt::red); m_scene->addRect(m_scene->sceneRect(), pen); GTextGraphic* lText = new GTextGraphic("Qt Mobile"); lText->setFlags(QGraphicsSimpleTextItem::ItemIsMovable); m_scene->addItem(lText); } //=============================================== GTextGraphic::GTextGraphic(const QString& _text) : QGraphicsSimpleTextItem(_text) , m_text(_text) { } //=============================================== void GTextGraphic::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) { if (scene()->collidingItems(this).isEmpty()) QGraphicsSimpleTextItem::setText("BOOM!"); else QGraphicsSimpleTextItem::setText(m_text); QGraphicsSimpleTextItem::paint(painter, option, widget); } //===============================================
//=============================================== int main(int argc, char** argv) { QGuiApplication lApp(argc, argv); QQmlApplicationEngine lEngine; const QUrl lUrl(u"qrc:/qml/main.qml"_qs); QObject::connect(&lEngine, &QQmlApplicationEngine::objectCreationFailed, &lApp, []() { QCoreApplication::exit(-1); }, Qt::QueuedConnection); lEngine.load(lUrl); return lApp.exec(); } //===============================================
//=============================================== Window { width: 400 height: 300 visible: true title: qsTr("ReadyApp") } //===============================================
//=============================================== Window { width: 400 height: 300 visible: true title: qsTr("ReadyApp") Rectangle { x: 10; y: 10; width: 100; height: 100 color: "red" } } //===============================================
//=============================================== Window { width: 400 height: 300 visible: true title: qsTr("ReadyApp") Rectangle { anchors.fill: parent color: "red" } } //===============================================
//=============================================== Window { width: 400 height: 300 visible: true title: qsTr("ReadyApp") Rectangle { anchors.fill: parent gradient: Gradient { GradientStop { position: 0.0; color: "green"; } GradientStop { position: 0.25; color: "purple"; } GradientStop { position: 0.75; color: "yellow"; } GradientStop { position: 1.0; color: "black"; } } } } //===============================================
//=============================================== Window { width: 400 height: 300 visible: true title: qsTr("ReadyApp") Rectangle { anchors.fill: parent gradient: Gradient { GradientStop { position: 0.0; color: "green"; } GradientStop { position: 0.25; color: "purple"; } GradientStop { position: 0.75; color: "yellow"; } GradientStop { position: 1.0; color: "black"; } } Text { id: textLabel text: "ReadyApp QML App" color: "cyan" font.pointSize: 20 anchors.top: parent.top anchors.horizontalCenter: parent.horizontalCenter } } } //===============================================
//=============================================== Window { width: 400 height: 300 visible: true title: qsTr("ReadyApp") Rectangle { anchors.fill: parent gradient: Gradient { GradientStop { position: 0.0; color: "green"; } GradientStop { position: 0.25; color: "purple"; } GradientStop { position: 0.75; color: "yellow"; } GradientStop { position: 1.0; color: "black"; } } Text { id: textLabel text: "ReadyApp QML App" color: "cyan" font.pointSize: 20 anchors.top: parent.top anchors.horizontalCenter: parent.horizontalCenter } GaussianBlur { anchors.fill: textLabel source: textLabel radius: 8 samples: 16 } } } //===============================================
//=============================================== Window { width: 400 height: 300 visible: true title: qsTr("ReadyApp") Rectangle { anchors.fill: parent color: "gray" } } //===============================================
//=============================================== Window { width: 400 height: 300 visible: true title: qsTr("ReadyApp") Rectangle { anchors.fill: parent color: "gray" } ListModel { id: myListModel ListElement { carModel: "Tesla" } ListElement { carModel: "Ford Sync 3" } ListElement { carModel: "Unknown" } ListElement { carModel: "Tesla" } ListElement { carModel: "Ford Sync 3" } ListElement { carModel: "Unknown" } ListElement { carModel: "Tesla" } ListElement { carModel: "Ford Sync 3" } ListElement { carModel: "Unknown" } } } //===============================================
//=============================================== Window { width: 400 height: 300 visible: true title: qsTr("ReadyApp") Rectangle { anchors.fill: parent color: "gray" GridView { id: gridView anchors.fill: parent anchors.margins: 30 } } ListModel { id: myListModel ListElement { carModel: "Tesla" } ListElement { carModel: "Ford Sync 3" } ListElement { carModel: "Unknown" } ListElement { carModel: "Tesla" } ListElement { carModel: "Ford Sync 3" } ListElement { carModel: "Unknown" } ListElement { carModel: "Tesla" } ListElement { carModel: "Ford Sync 3" } ListElement { carModel: "Unknown" } } } //===============================================
//=============================================== Window { width: 400 height: 300 visible: true title: qsTr("ReadyApp") Rectangle { anchors.fill: parent color: "gray" GridView { id: gridView anchors.fill: parent anchors.margins: 30 model: myListModel delegate: Rectangle { id: theDelegate width: 50; height: 50 color: "red" } } } ListModel { id: myListModel ListElement { carModel: "Tesla" } ListElement { carModel: "Ford Sync 3" } ListElement { carModel: "Unknown" } ListElement { carModel: "Tesla" } ListElement { carModel: "Ford Sync 3" } ListElement { carModel: "Unknown" } ListElement { carModel: "Tesla" } ListElement { carModel: "Ford Sync 3" } ListElement { carModel: "Unknown" } } } //===============================================
//=============================================== Window { width: 400 height: 300 visible: true title: qsTr("ReadyApp") Rectangle { anchors.fill: parent color: "gray" GridView { id: gridView anchors.fill: parent anchors.margins: 30 model: myListModel delegate: Rectangle { id: theDelegate width: 50; height: 50 color: "red" Text { text: carModel } } } } ListModel { id: myListModel ListElement { carModel: "Tesla" } ListElement { carModel: "Ford Sync 3" } ListElement { carModel: "Unknown" } ListElement { carModel: "Tesla" } ListElement { carModel: "Ford Sync 3" } ListElement { carModel: "Unknown" } ListElement { carModel: "Tesla" } ListElement { carModel: "Ford Sync 3" } ListElement { carModel: "Unknown" } } } //===============================================
//=============================================== Window { width: 400 height: 300 visible: true title: qsTr("ReadyApp") Rectangle { anchors.fill: parent GridView { id: gridView anchors.fill: parent anchors.margins: 30 model: myListModel delegate: Rectangle { id: theDelegate Text { text: carModel } Image { source: "/img/icons8-sedan-64.png" } } } } ListModel { id: myListModel ListElement { carModel: "Tesla" } ListElement { carModel: "Ford Sync 3" } ListElement { carModel: "Unknown" } ListElement { carModel: "Tesla" } ListElement { carModel: "Ford Sync 3" } ListElement { carModel: "Unknown" } ListElement { carModel: "Tesla" } ListElement { carModel: "Ford Sync 3" } ListElement { carModel: "Unknown" } } } //===============================================
//=============================================== Window { width: 400 height: 300 visible: true title: qsTr("ReadyApp") Rectangle { anchors.fill: parent GridView { id: gridView anchors.fill: parent anchors.margins: 30 model: myListModel delegate: Rectangle { id: theDelegate Text { text: carModel } Image { source: "/img/icons8-sedan-64.png" } } flow: GridView.FlowLeftToRight } } ListModel { id: myListModel ListElement { carModel: "Tesla" } ListElement { carModel: "Ford Sync 3" } ListElement { carModel: "Unknown" } ListElement { carModel: "Tesla" } ListElement { carModel: "Ford Sync 3" } ListElement { carModel: "Unknown" } ListElement { carModel: "Tesla" } ListElement { carModel: "Ford Sync 3" } ListElement { carModel: "Unknown" } } } //===============================================
//=============================================== Window { width: 400 height: 300 visible: true title: qsTr("ReadyApp") Rectangle { anchors.fill: parent GridView { id: gridView anchors.fill: parent anchors.margins: 30 model: myListModel delegate: Rectangle { id: theDelegate Text { text: carModel } Image { source: "/img/icons8-sedan-64.png" } } flow: GridView.FlowTopToBottom } } ListModel { id: myListModel ListElement { carModel: "Tesla" } ListElement { carModel: "Ford Sync 3" } ListElement { carModel: "Unknown" } ListElement { carModel: "Tesla" } ListElement { carModel: "Ford Sync 3" } ListElement { carModel: "Unknown" } ListElement { carModel: "Tesla" } ListElement { carModel: "Ford Sync 3" } ListElement { carModel: "Unknown" } } } //===============================================
//=============================================== Window { width: 400 height: 300 visible: true title: qsTr("ReadyApp") Rectangle { anchors.fill: parent GridView { id: gridView anchors.fill: parent anchors.margins: 30 model: myListModel delegate: Rectangle { id: theDelegate Text { text: carModel } Image { source: "/img/icons8-sedan-64.png" } } flow: GridView.FlowTopToBottom layoutDirection: Qt.LeftToRight } } ListModel { id: myListModel ListElement { carModel: "Tesla" } ListElement { carModel: "Ford Sync 3" } ListElement { carModel: "Unknown" } ListElement { carModel: "Tesla" } ListElement { carModel: "Ford Sync 3" } ListElement { carModel: "Unknown" } ListElement { carModel: "Tesla" } ListElement { carModel: "Ford Sync 3" } ListElement { carModel: "Unknown" } } } //===============================================
//=============================================== Window { width: 400 height: 300 visible: true title: qsTr("ReadyApp") Rectangle { anchors.fill: parent GridView { id: gridView anchors.fill: parent anchors.margins: 30 model: myListModel delegate: Rectangle { id: theDelegate Text { text: carModel } Image { source: "/img/icons8-sedan-64.png" } } flow: GridView.FlowTopToBottom layoutDirection: Qt.RightToLeft } } ListModel { id: myListModel ListElement { carModel: "Tesla" } ListElement { carModel: "Ford Sync 3" } ListElement { carModel: "Unknown" } ListElement { carModel: "Tesla" } ListElement { carModel: "Ford Sync 3" } ListElement { carModel: "Unknown" } ListElement { carModel: "Tesla" } ListElement { carModel: "Ford Sync 3" } ListElement { carModel: "Unknown" } } } //===============================================
//=============================================== Window { width: 400 height: 300 visible: true title: qsTr("ReadyApp") Rectangle { anchors.fill: parent GridView { id: gridView anchors.fill: parent anchors.margins: 30 model: myListModel delegate: Rectangle { id: theDelegate Text { text: carModel } Image { source: "/img/icons8-sedan-64.png" } } flow: GridView.FlowTopToBottom layoutDirection: Qt.LeftToRight verticalLayoutDirection: GridView.TopToBottom } } ListModel { id: myListModel ListElement { carModel: "Tesla" } ListElement { carModel: "Ford Sync 3" } ListElement { carModel: "Unknown" } ListElement { carModel: "Tesla" } ListElement { carModel: "Ford Sync 3" } ListElement { carModel: "Unknown" } ListElement { carModel: "Tesla" } ListElement { carModel: "Ford Sync 3" } ListElement { carModel: "Unknown" } } } //===============================================
//=============================================== Window { width: 400 height: 300 visible: true title: qsTr("ReadyApp") Rectangle { anchors.fill: parent GridView { id: gridView anchors.fill: parent anchors.margins: 30 model: myListModel delegate: Rectangle { id: theDelegate Text { text: carModel } Image { source: "/img/icons8-sedan-64.png" } } flow: GridView.FlowTopToBottom layoutDirection: Qt.LeftToRight verticalLayoutDirection: GridView.BottomToTop } } ListModel { id: myListModel ListElement { carModel: "Tesla" } ListElement { carModel: "Ford Sync 3" } ListElement { carModel: "Unknown" } ListElement { carModel: "Tesla" } ListElement { carModel: "Ford Sync 3" } ListElement { carModel: "Unknown" } ListElement { carModel: "Tesla" } ListElement { carModel: "Ford Sync 3" } ListElement { carModel: "Unknown" } } } //===============================================
//=============================================== Window { width: 400 height: 300 visible: true title: qsTr("ReadyApp") Rectangle { anchors.fill: parent color: "gray" } } //===============================================
//=============================================== Window { width: 400 height: 300 visible: true title: qsTr("ReadyApp") Rectangle { anchors.fill: parent color: "gray" } ListModel { id: myListModel ListElement { carModel: "Tesla" } ListElement { carModel: "Ford Sync 3" } ListElement { carModel: "Unknown" } ListElement { carModel: "Tesla" } ListElement { carModel: "Ford Sync 3" } ListElement { carModel: "Unknown" } ListElement { carModel: "Tesla" } ListElement { carModel: "Ford Sync 3" } ListElement { carModel: "Unknown" } } } //===============================================
//=============================================== Window { width: 400 height: 300 visible: true title: qsTr("ReadyApp") Rectangle { anchors.fill: parent color: "gray" PathView { id: pathView anchors.fill: parent anchors.margins: 30 } } ListModel { id: myListModel ListElement { carModel: "Tesla" } ListElement { carModel: "Ford Sync 3" } ListElement { carModel: "Unknown" } ListElement { carModel: "Tesla" } ListElement { carModel: "Ford Sync 3" } ListElement { carModel: "Unknown" } ListElement { carModel: "Tesla" } ListElement { carModel: "Ford Sync 3" } ListElement { carModel: "Unknown" } } } //===============================================
//=============================================== Window { width: 400 height: 300 visible: true title: qsTr("ReadyApp") Rectangle { anchors.fill: parent color: "gray" PathView { id: pathView anchors.fill: parent anchors.margins: 30 path: Path { startX: 0; startY: 0 PathArc { x: 0; y: 200; radiusX: 10; radiusY: 4 } } } } ListModel { id: myListModel ListElement { carModel: "Tesla" } ListElement { carModel: "Ford Sync 3" } ListElement { carModel: "Unknown" } ListElement { carModel: "Tesla" } ListElement { carModel: "Ford Sync 3" } ListElement { carModel: "Unknown" } ListElement { carModel: "Tesla" } ListElement { carModel: "Ford Sync 3" } ListElement { carModel: "Unknown" } } } //===============================================
//=============================================== Window { width: 400 height: 300 visible: true title: qsTr("ReadyApp") Rectangle { anchors.fill: parent color: "gray" PathView { id: pathView anchors.fill: parent anchors.margins: 30 path: Path { startX: 0; startY: 0 PathArc { x: 0; y: 200; radiusX: 10; radiusY: 4 } } model: myListModel delegate: Rectangle { id: theDelegate width: 50; height: 50; color: "red" } } } ListModel { id: myListModel ListElement { carModel: "Tesla" } ListElement { carModel: "Ford Sync 3" } ListElement { carModel: "Unknown" } ListElement { carModel: "Tesla" } ListElement { carModel: "Ford Sync 3" } ListElement { carModel: "Unknown" } ListElement { carModel: "Tesla" } ListElement { carModel: "Ford Sync 3" } ListElement { carModel: "Unknown" } } } //===============================================
//=============================================== Window { width: 400 height: 300 visible: true title: qsTr("ReadyApp") Rectangle { anchors.fill: parent color: "gray" PathView { id: pathView anchors.fill: parent anchors.margins: 30 path: Path { startX: 0; startY: 0 PathArc { x: 0; y: 200; radiusX: 10; radiusY: 4 } } model: myListModel delegate: Rectangle { id: theDelegate width: 50; height: 50; color: "red" Text { text: carModel } } } } ListModel { id: myListModel ListElement { carModel: "Tesla" } ListElement { carModel: "Ford Sync 3" } ListElement { carModel: "Unknown" } ListElement { carModel: "Tesla" } ListElement { carModel: "Ford Sync 3" } ListElement { carModel: "Unknown" } ListElement { carModel: "Tesla" } ListElement { carModel: "Ford Sync 3" } ListElement { carModel: "Unknown" } } } //===============================================
//=============================================== Window { width: 400 height: 300 visible: true title: qsTr("ReadyApp") Rectangle { anchors.fill: parent PathView { id: pathView anchors.fill: parent anchors.margins: 30 path: Path { startX: 0; startY: 0 PathArc { x: 0; y: 200; radiusX: 10; radiusY: 4 } } model: myListModel delegate: Rectangle { id: theDelegate Text { text: carModel } Image { source: "/img/icons8-sedan-64.png" } } } } ListModel { id: myListModel ListElement { carModel: "Tesla" } ListElement { carModel: "Ford Sync 3" } ListElement { carModel: "Unknown" } ListElement { carModel: "Tesla" } ListElement { carModel: "Ford Sync 3" } ListElement { carModel: "Unknown" } ListElement { carModel: "Tesla" } ListElement { carModel: "Ford Sync 3" } ListElement { carModel: "Unknown" } } } //===============================================
//=============================================== Window { width: 400 height: 300 visible: true title: qsTr("ReadyApp") Flow { anchors.fill: parent anchors.margins: 4 spacing: 10 Rectangle { width: 50; height: 50; color: "red" } Rectangle { width: 50; height: 50; color: "green" } Rectangle { width: 50; height: 50; color: "blue" } } } //===============================================
//=============================================== Window { width: 400 height: 300 visible: true title: qsTr("ReadyApp") Flow { anchors.fill: parent anchors.margins: 4 spacing: 10 Text { text: "ReadyApp" color: "purple" font.pointSize: 20 } Text { text: "QML" color: "red" font.pointSize: 20 } Text { text: "Mobile" color: "blue" font.pointSize: 20 } } } //===============================================
//=============================================== Window { width: 400 height: 300 visible: true title: qsTr("ReadyApp") Flow { anchors.fill: parent anchors.margins: 4 spacing: 10 Rectangle { width: 35 height: 35 gradient: Gradient { GradientStop { position: 0.0; color: "green"; } GradientStop { position: 0.25; color: "purple"; } GradientStop { position: 0.5; color: "yellow"; } GradientStop { position: 1.0; color: "black"; } } } Text { text: "ReadyApp" color: "purple" font.pointSize: 20 } Text { text: "QML" color: "red" font.pointSize: 20 } Text { text: "Mobile" color: "blue" font.pointSize: 20 } } } //===============================================
//=============================================== Window { width: 400 height: 300 visible: true title: qsTr("ReadyApp") color: "black" } //===============================================
//=============================================== Window { width: 400 height: 300 visible: true title: qsTr("ReadyApp") color: "black" MultiPointTouchArea { anchors.fill: parent touchPoints: [ TouchPoint { id: touch1 }, TouchPoint { id: touch2 }, TouchPoint { id: touch3 } ] } } //===============================================
//=============================================== Window { width: 400 height: 300 visible: true title: qsTr("ReadyApp") color: "black" MultiPointTouchArea { anchors.fill: parent touchPoints: [ TouchPoint { id: touch1 }, TouchPoint { id: touch2 }, TouchPoint { id: touch3 } ] Rectangle { width: 45; height: 45 color: "#80c342" x: touch1.x y: touch1.y radius: 50 } } } //===============================================
//=============================================== Window { width: 400 height: 300 visible: true title: qsTr("ReadyApp") color: "black" MultiPointTouchArea { anchors.fill: parent touchPoints: [ TouchPoint { id: touch1 }, TouchPoint { id: touch2 }, TouchPoint { id: touch3 } ] Rectangle { width: 45; height: 45 color: "#80c342" x: touch1.x y: touch1.y radius: 50 Behavior on x { PropertyAnimation {easing.type: Easing.OutBounce; duration: 500 } } } } } //===============================================
//=============================================== Window { width: 400 height: 300 visible: true title: qsTr("ReadyApp") color: "black" MultiPointTouchArea { anchors.fill: parent touchPoints: [ TouchPoint { id: touch1 }, TouchPoint { id: touch2 }, TouchPoint { id: touch3 } ] Rectangle { width: 45; height: 45 color: "#80c342" x: touch1.x y: touch1.y radius: 50 Behavior on x { PropertyAnimation { easing.type: Easing.OutBounce; duration: 500 } } Behavior on y { PropertyAnimation { easing.type: Easing.OutBounce; duration: 500 } } } } } //===============================================
//=============================================== Window { width: 400 height: 300 visible: true title: qsTr("ReadyApp") color: "black" MultiPointTouchArea { anchors.fill: parent touchPoints: [ TouchPoint { id: touch1 }, TouchPoint { id: touch2 }, TouchPoint { id: touch3 } ] Rectangle { width: 45; height: 45 color: "#80c342" x: touch1.x y: touch1.y radius: 50 Behavior on x { PropertyAnimation { easing.type: Easing.OutBounce; duration: 500 } } Behavior on y { PropertyAnimation { easing.type: Easing.OutBounce; duration: 500 } } } Rectangle { width: 45; height: 45 color: "#b40000" x: touch2.x y: touch2.y radius: 50 Behavior on x { PropertyAnimation {easing.type: Easing.OutBounce; duration: 500 } } Behavior on y { PropertyAnimation {easing.type: Easing.OutBounce; duration: 500 } } } } } //===============================================
//=============================================== Window { width: 400 height: 300 visible: true title: qsTr("ReadyApp") color: "black" MultiPointTouchArea { anchors.fill: parent touchPoints: [ TouchPoint { id: touch1 }, TouchPoint { id: touch2 }, TouchPoint { id: touch3 } ] Rectangle { width: 45; height: 45 color: "#80c342" x: touch1.x y: touch1.y radius: 50 Behavior on x { PropertyAnimation { easing.type: Easing.OutBounce; duration: 500 } } Behavior on y { PropertyAnimation { easing.type: Easing.OutBounce; duration: 500 } } } Rectangle { width: 45; height: 45 color: "#b40000" x: touch2.x y: touch2.y radius: 50 Behavior on x { PropertyAnimation {easing.type: Easing.OutBounce; duration: 500 } } Behavior on y { PropertyAnimation {easing.type: Easing.OutBounce; duration: 500 } } } Rectangle { width: 45; height: 45 color: "#6b11d8" x: touch3.x y: touch3.y radius: 50 Behavior on x { PropertyAnimation { easing.type: Easing.OutBounce; duration: 500 } } Behavior on y { PropertyAnimation { easing.type: Easing.OutBounce; duration: 500 } } } } } //===============================================
//=============================================== Window { width: 400 height: 300 visible: true title: qsTr("ReadyApp") GridLayout { rows: 3 columns: 2 Rectangle { width: 50; height: 50; color: "red" } Rectangle { width: 50; height: 50; color: "green" } Rectangle { width: 50; height: 50; color: "blue" } } } //===============================================
//=============================================== Window { width: 400 height: 300 visible: true title: qsTr("ReadyApp") GridLayout { rows: 3 columns: 2 Text { text: "ReadyApp" color: "purple" font.pointSize: 20 } Text { text: "QML" color: "red" font.pointSize: 20 } Text { text: "Mobile" color: "blue" font.pointSize: 20 Layout.fillHeight: true } } } //===============================================
//=============================================== ApplicationWindow { width: 400 height: 300 visible: true title: qsTr("ReadyApp") } //===============================================
//=============================================== ApplicationWindow { width: 400 height: 300 visible: true title: qsTr("ReadyApp") menuBar: MenuBar { } } //===============================================
//=============================================== ApplicationWindow { width: 400 height: 300 visible: true title: qsTr("ReadyApp") menuBar: MenuBar { Menu { title: "Fichier" } } } //===============================================
//=============================================== ApplicationWindow { width: 400 height: 300 visible: true title: qsTr("ReadyApp") menuBar: MenuBar { Menu { title: "Fichier" MenuItem { text: "Ouvrir" } } } } //===============================================
//=============================================== ApplicationWindow { width: 400 height: 300 visible: true title: qsTr("ReadyApp") menuBar: MenuBar { Menu { title: "Fichier" MenuItem { text: "Ouvrir" onTriggered: {console.log("Ouverture d'un fichier...")} } } } } //===============================================
//=============================================== ApplicationWindow { width: 400 height: 300 visible: true title: qsTr("ReadyApp") menuBar: MenuBar { Menu { title: "Fichier" MenuItem { text: "Ouvrir" onTriggered: msgDialog.open() } } } MessageDialog { id: msgDialog title: qsTr("ReadyApp | Message") text: qsTr("Ouverture d'un fichier...") } } //===============================================
//=============================================== ApplicationWindow { width: 400 height: 300 visible: true title: qsTr("ReadyApp") menuBar: MenuBar { Menu { title: "Fichier" MenuItem { text: "Ouvrir" onTriggered: {console.log("Ouverture d'un fichier...")} } } } header: TextField { } } //===============================================
//=============================================== ApplicationWindow { width: 400 height: 300 visible: true title: qsTr("ReadyApp") menuBar: MenuBar { Menu { title: "Fichier" MenuItem { text: "Ouvrir" onTriggered: {console.log("Ouverture d'un fichier...")} } } } header: TextField { placeholderText: "Saisissez un texte..." } } //===============================================
//=============================================== Window { width: 400 height: 300 visible: true title: qsTr("ReadyApp") } //===============================================
//=============================================== ApplicationWindow { width: 400 height: 300 visible: true title: qsTr("ReadyApp") SwipeView { id: swipeView anchors.fill: parent } } //===============================================
//=============================================== ApplicationWindow { width: 400 height: 300 visible: true title: qsTr("ReadyApp") SwipeView { id: swipeView anchors.fill: parent Page { id: page1 anchors.fill: parent.fill } } } //===============================================
//=============================================== ApplicationWindow { width: 400 height: 300 visible: true title: qsTr("ReadyApp") SwipeView { id: swipeView anchors.fill: parent Page { id: page1 anchors.fill: parent.fill Rectangle { anchors.fill: parent color: "red" Text { text: qsTr("Page1") font.pointSize: 20 anchors.horizontalCenter: parent.horizontalCenter anchors.verticalCenter: parent.verticalCenter } } } } } //===============================================
//=============================================== ApplicationWindow { width: 400 height: 300 visible: true title: qsTr("ReadyApp") SwipeView { id: swipeView anchors.fill: parent Page { id: page1 anchors.fill: parent.fill Rectangle { anchors.fill: parent color: "red" Text { text: qsTr("Page1") font.pointSize: 20 anchors.horizontalCenter: parent.horizontalCenter anchors.verticalCenter: parent.verticalCenter } } } } PageIndicator { id: indicator count: swipeView.count currentIndex: swipeView.currentIndex anchors.bottom: swipeView.bottom anchors.horizontalCenter: parent.horizontalCenter } } //===============================================
//=============================================== ApplicationWindow { width: 400 height: 300 visible: true title: qsTr("ReadyApp") SwipeView { id: swipeView anchors.fill: parent Page { id: page1 anchors.fill: parent.fill Rectangle { anchors.fill: parent color: "red" anchors.bottomMargin: 20 Text { text: qsTr("Page1") font.pointSize: 20 anchors.horizontalCenter: parent.horizontalCenter anchors.verticalCenter: parent.verticalCenter } } } } PageIndicator { id: indicator count: swipeView.count currentIndex: swipeView.currentIndex anchors.bottom: swipeView.bottom anchors.horizontalCenter: parent.horizontalCenter } } //===============================================
//=============================================== ApplicationWindow { width: 400 height: 300 visible: true title: qsTr("ReadyApp") SwipeView { id: swipeView anchors.fill: parent Page { id: page1 anchors.fill: parent.fill Rectangle { anchors.fill: parent color: "red" anchors.bottomMargin: 20 Text { text: qsTr("Page1") font.pointSize: 20 anchors.horizontalCenter: parent.horizontalCenter anchors.verticalCenter: parent.verticalCenter } } } Page { id: page2 anchors.fill: parent.fill Rectangle { anchors.fill: parent color: "green" anchors.bottomMargin: 20 Text { text: qsTr("Page2") font.pointSize: 20 anchors.horizontalCenter: parent.horizontalCenter anchors.verticalCenter: parent.verticalCenter } } } } PageIndicator { id: indicator count: swipeView.count currentIndex: swipeView.currentIndex anchors.bottom: swipeView.bottom anchors.horizontalCenter: parent.horizontalCenter } } //===============================================
//=============================================== ApplicationWindow { width: 400 height: 300 visible: true title: qsTr("ReadyApp") SwipeView { id: swipeView anchors.fill: parent Page { id: page1 anchors.fill: parent.fill Rectangle { anchors.fill: parent color: "red" anchors.bottomMargin: 20 Text { text: qsTr("Page1") font.pointSize: 20 anchors.horizontalCenter: parent.horizontalCenter anchors.verticalCenter: parent.verticalCenter } } } Page { id: page2 anchors.fill: parent.fill Rectangle { anchors.fill: parent color: "green" anchors.bottomMargin: 20 Text { text: qsTr("Page2") font.pointSize: 20 anchors.horizontalCenter: parent.horizontalCenter anchors.verticalCenter: parent.verticalCenter } } } Page { id: page3 anchors.fill: parent.fill Rectangle { anchors.fill: parent color: "blue" anchors.bottomMargin: 20 Text { text: qsTr("Page3") font.pointSize: 20 anchors.horizontalCenter: parent.horizontalCenter anchors.verticalCenter: parent.verticalCenter } } } } PageIndicator { id: indicator count: swipeView.count currentIndex: swipeView.currentIndex anchors.bottom: swipeView.bottom anchors.horizontalCenter: parent.horizontalCenter } } //===============================================
[Controls] Style=Material [Material] Theme=Dark
//=============================================== ApplicationWindow { width: 400 height: 300 visible: true title: qsTr("ReadyApp") SwipeView { id: swipeView anchors.fill: parent Page { id: page1 anchors.fill: parent.fill Rectangle { anchors.fill: parent color: "transparent" anchors.bottomMargin: 20 Text { text: qsTr("Page1") font.pointSize: 20 color: "red" anchors.horizontalCenter: parent.horizontalCenter anchors.verticalCenter: parent.verticalCenter } } } Page { id: page2 anchors.fill: parent.fill Rectangle { anchors.fill: parent color: "transparent" anchors.bottomMargin: 20 Text { text: qsTr("Page2") font.pointSize: 20 color: "green" anchors.horizontalCenter: parent.horizontalCenter anchors.verticalCenter: parent.verticalCenter } } } Page { id: page3 anchors.fill: parent.fill Rectangle { anchors.fill: parent color: "transparent" anchors.bottomMargin: 20 Text { text: qsTr("Page3") font.pointSize: 20 color: "blue" anchors.horizontalCenter: parent.horizontalCenter anchors.verticalCenter: parent.verticalCenter } } } } PageIndicator { id: indicator count: swipeView.count currentIndex: swipeView.currentIndex anchors.bottom: swipeView.bottom anchors.horizontalCenter: parent.horizontalCenter } } //===============================================
//=============================================== ApplicationWindow { width: 400 height: 300 visible: true title: qsTr("ReadyApp") menuBar: MenuBar { Menu { title: "Fichier" MenuItem { text: "Ouvrir" onTriggered: msgDialog.open() } } } header: TextField { placeholderText: "Saisissez un texte..." } MessageDialog { id: msgDialog title: "ReadyApp | Messages" text: "Ouverture d'un fichier..." } SwipeView { id: swipeView anchors.fill: parent Page { id: page1 anchors.fill: parent.fill Rectangle { anchors.fill: parent color: "transparent" anchors.bottomMargin: 20 Text { text: qsTr("Page1") font.pointSize: 20 color: "red" anchors.horizontalCenter: parent.horizontalCenter anchors.verticalCenter: parent.verticalCenter } } } Page { id: page2 anchors.fill: parent.fill Rectangle { anchors.fill: parent color: "transparent" anchors.bottomMargin: 20 Text { text: qsTr("Page2") font.pointSize: 20 color: "green" anchors.horizontalCenter: parent.horizontalCenter anchors.verticalCenter: parent.verticalCenter } } } Page { id: page3 anchors.fill: parent.fill Rectangle { anchors.fill: parent color: "transparent" anchors.bottomMargin: 20 Text { text: qsTr("Page3") font.pointSize: 20 color: "blue" anchors.horizontalCenter: parent.horizontalCenter anchors.verticalCenter: parent.verticalCenter } } } } PageIndicator { id: indicator count: swipeView.count currentIndex: swipeView.currentIndex anchors.bottom: swipeView.bottom anchors.horizontalCenter: parent.horizontalCenter } } //===============================================
//=============================================== ApplicationWindow { width: 400 height: 300 visible: true title: qsTr("ReadyApp") menuBar: MenuBar { Menu { title: "Fichier" MenuItem { text: "Ouvrir" onTriggered: msgDialog.open() } } } header: TextField { placeholderText: "Saisissez un texte..." } MessageDialog { id: msgDialog title: "ReadyApp | Messages" text: "Ouverture d'un fichier..." } SwipeView { id: swipeView anchors.fill: parent Page { id: page1 anchors.fill: parent.fill header: Label { text: "Fonctionnement" font.pixelSize: Qt.application.font.pixelSize * 2 padding: 10 } } Page { id: page2 anchors.fill: parent.fill Rectangle { anchors.fill: parent color: "transparent" anchors.bottomMargin: 20 Text { text: qsTr("Page2") font.pointSize: 20 color: "green" anchors.horizontalCenter: parent.horizontalCenter anchors.verticalCenter: parent.verticalCenter } } } Page { id: page3 anchors.fill: parent.fill Rectangle { anchors.fill: parent color: "transparent" anchors.bottomMargin: 20 Text { text: qsTr("Page3") font.pointSize: 20 color: "blue" anchors.horizontalCenter: parent.horizontalCenter anchors.verticalCenter: parent.verticalCenter } } } } PageIndicator { id: indicator count: swipeView.count currentIndex: swipeView.currentIndex anchors.bottom: swipeView.bottom anchors.horizontalCenter: parent.horizontalCenter } } //===============================================
//=============================================== ApplicationWindow { width: 400 height: 300 visible: true title: qsTr("ReadyApp") menuBar: MenuBar { Menu { title: "Fichier" MenuItem { text: "Ouvrir" onTriggered: msgDialog.open() } } } header: TextField { placeholderText: "Saisissez un texte..." } MessageDialog { id: msgDialog title: "ReadyApp | Messages" text: "Ouverture d'un fichier..." } SwipeView { id: swipeView anchors.fill: parent Page { id: page1 anchors.fill: parent.fill header: Label { text: "Fonctionnement" font.pixelSize: Qt.application.font.pixelSize * 2 padding: 10 } BusyIndicator { id: busyId anchors.centerIn: parent running: true; } Label { text: "En cours de traitement..." anchors.top: busyId.bottom anchors.horizontalCenter: parent.horizontalCenter } } Page { id: page2 anchors.fill: parent.fill Rectangle { anchors.fill: parent color: "transparent" anchors.bottomMargin: 20 Text { text: qsTr("Page2") font.pointSize: 20 color: "green" anchors.horizontalCenter: parent.horizontalCenter anchors.verticalCenter: parent.verticalCenter } } } Page { id: page3 anchors.fill: parent.fill Rectangle { anchors.fill: parent color: "transparent" anchors.bottomMargin: 20 Text { text: qsTr("Page3") font.pointSize: 20 color: "blue" anchors.horizontalCenter: parent.horizontalCenter anchors.verticalCenter: parent.verticalCenter } } } } PageIndicator { id: indicator count: swipeView.count currentIndex: swipeView.currentIndex anchors.bottom: swipeView.bottom anchors.horizontalCenter: parent.horizontalCenter } } //===============================================
//=============================================== ApplicationWindow { width: 400 height: 300 visible: true title: qsTr("ReadyApp") menuBar: MenuBar { Menu { title: "Fichier" MenuItem { text: "Ouvrir" onTriggered: msgDialog.open() } } } header: TextField { placeholderText: "Saisissez un texte..." } MessageDialog { id: msgDialog title: "ReadyApp | Messages" text: "Ouverture d'un fichier..." } SwipeView { id: swipeView anchors.fill: parent Page { id: page1 anchors.fill: parent.fill header: Label { text: "Fonctionnement" font.pixelSize: Qt.application.font.pixelSize * 2 padding: 10 } BusyIndicator { id: busyId anchors.centerIn: parent running: true; } Label { text: "En cours de traitement..." anchors.top: busyId.bottom anchors.horizontalCenter: parent.horizontalCenter } } Page { id: page2 anchors.fill: parent.fill header: Label { text: "Retour" font.pixelSize: Qt.application.font.pixelSize * 2 padding: 10 } Column { anchors.centerIn: parent Button { text: "Cliquer pour retourner" background: Rectangle { color: "#673AB7" radius: 50 border.color: "#4CAF50" border.width: 2 } onClicked: swipeView.currentIndex = 0 } Label { text: "ReadyApp QML Mobile" } } } Page { id: page3 anchors.fill: parent.fill Rectangle { anchors.fill: parent color: "transparent" anchors.bottomMargin: 20 Text { text: qsTr("Page3") font.pointSize: 20 color: "blue" anchors.horizontalCenter: parent.horizontalCenter anchors.verticalCenter: parent.verticalCenter } } } } PageIndicator { id: indicator count: swipeView.count currentIndex: swipeView.currentIndex anchors.bottom: swipeView.bottom anchors.horizontalCenter: parent.horizontalCenter } } //===============================================