I didn’t have time to program today, I had to attend to some issues that’s been piling up. So, basically what I did today was part of what I’m going to do in the application I’m building. Now that I got most of the puzzle complete I have to sit down and do some design decisions in the application on how I’m going to lay everything out:

  • Communication between objects
  • How to ensure responsiveness on different displays.
  • How to organize QML files, which is by far the hardest since I’m not that familiar with QML. There seems to be no standard way to organize the files you create.

Anyway, this is what I did today:

Code:

import QtQuick 2.0
import QtQuick.Controls 1.2
import QtQuick.Dialogs 1.2


StackView {


    id: stack
    initialItem: redview

    Component {
        id: redview
        Rectangle {
            id: reddy
            width: parent.width
            height: parent.height
            color: "red"
            border.color: "black"
            border.width: 3

            Text {
                id: blah
                color: "white"
                anchors.centerIn: parent

                text: qsTr("Jump to [lightblue view]")
 
            }
               MouseArea {
                    anchors.fill: parent
                    onClicked: stack.push(lightblueview)
                }


        }

    }

    Component {
        id: lightblueview

        Rectangle {
            id: bloo
            width: 400
            height: 500
            color: "lightblue"
            Text {
                id: blah
                color: "white"

                anchors.centerIn: parent
                text: qsTr("Jump to [red view]")
            }
            MouseArea {
                anchors.fill: parent
                onClicked: stack.push(redview)
            }
        }
    }

}

StackView isn’t that bad to use. It’s incredibly easy and the more I read it seems that I’m going to have a good time using it. Hopefully things will work out on my end.

I think QMLs only difficulty right now is actually knowing the all the attributes, members of each QtQuick control, dialog, UI element. I feel it’s really overwhelming.