Wizard



  • I intend to create an assistant, does anyone know of any examples? I can not override buttons

    import QtQuick 2.0
    import QtQuick.Controls 2.0
    import QtQuick.Layouts 1.0
    Page{
        header:HeaderBar{}
    GridLayout {
       id : grid
       anchors.fill: parent
       rows    : 12
        columns : 12
        property double colMulti : grid.width / grid.columns
       property double rowMulti : grid.height / grid.rows
       function prefWidth(item){
          return colMulti * item.Layout.columnSpan
        }
        function prefHeight(item){
            return rowMulti * item.Layout.rowSpan
        }
    
        Rectangle {
            color : 'white'
            Layout.rowSpan   : 10
            Layout.columnSpan: 3
           Layout.preferredWidth  : grid.prefWidth(this)
            Layout.preferredHeight : grid.prefHeight(this)
    
            Label {
                y:20
                font.pixelSize: 22
                width: parent.width
                elide: Label.ElideRight
                horizontalAlignment: Qt.AlignHCenter
                text: qsTr("Steps")
            }
    
            Label{
                y:40
                width: parent.width
                elide: Label.ElideRight
                text:"______________________"
                horizontalAlignment: Qt.AlignHCenter
            }
    
    
            Label {
                y:90
               id:step1
                font.pixelSize: 15
              width: parent.width
              elide: Label.ElideRight
              horizontalAlignment: Qt.AlignHCenter
                text: qsTr("Step")
            }
    
    
            Label {
               y:120
              id:step2
              font.pixelSize: 15
              width: parent.width
               elide: Label.ElideRight
              horizontalAlignment: Qt.AlignHCenter
              text: qsTr("Step")
          }
           Label {
               y:150
    
               font.pixelSize: 15
                width: parent.width
               elide: Label.ElideRight
                horizontalAlignment: Qt.AlignHCenter
                text: qsTr("Step")
            }
            Label {
                y:180
    
               font.pixelSize: 15
               width: parent.width
                elide: Label.ElideRight
                horizontalAlignment: Qt.AlignHCenter
                text: qsTr("Step")
            }
            Label {
                y:210
    
                font.pixelSize: 15
                width: parent.width
                elide: Label.ElideRight
               horizontalAlignment: Qt.AlignHCenter
                text: qsTr("Step")
            }
      }
      Rectangle {
         id:q
          color : 'gainsboro'
           Layout.rowSpan   : 10
           Layout.columnSpan: 9
          Layout.preferredWidth  : grid.prefWidth(this)
           Layout.preferredHeight : grid.prefHeight(this)
    
    
            Column {
               id: column
               y:20
                spacing: 20
                anchors.margins: 20
                anchors.left: parent.left
                anchors.right: parent.right
    
                Label {
                 id:center
                  font.pixelSize: 22
                    width: parent.width
                   elide: Label.ElideRight
                    horizontalAlignment: Qt.AlignHCenter
                   text: qsTr("Initialization")
               }
               Label {
                   id:c1
                   font.pixelSize: 15
                   width: parent.width
                   elide: Label.ElideRight
                 //  horizontalAlignment: Qt.AlignHCenter
                 text: qsTr("Number machine")
                }
    
           TextInput{
                    width: 500
                   text:"Required field"
                }
    
              Label {
                    id:c2
                   font.pixelSize: 15
                    width: parent.width
                    elide: Label.ElideRight
                    text: qsTr("it is obrigation to insert the machine number")
                }
    
               Row { // The "Row" type lays out its child items in a horizontal line
                   spacing: 60 // Places 20px of space between items
                   Rectangle {
                        width: 80;
                       height: 80;
                       //https://www.rapidtables.com/web/color/gray-color.html
                        color: 'gainsboro';
                       y:200
    
                      Button{
                            text:"< Back"
                       }
                   }
                    Rectangle {
                        width: 80;
                       height: 80;
                        color: 'gainsboro';
                        y:200
    
                        Button{
                            id:btn1
                           text:"Next"
                           onClicked:{
                                       //step 1
                                        center.text= "Group "
                                        c1.text="Id Term Group"
                                       c2.text="it is obrigation to insert the ID Term Group"
                                       btn1.visible="false"
    
    
                           }
    
                           Button {
                              x: 326
                               y: 2
                               text: "Cancel"
                              onClicked: {
                                   Qt.quit()
                              }
                           }
                        }
                   }
                }
      }
    
           ScrollIndicator.vertical: ScrollIndicator { }
       }
    
        Rectangle {
            id : greenRect
            color : '#9E9E9E'
          Layout.rowSpan : 2
            Layout.columnSpan : 12
            Layout.preferredWidth  : grid.prefWidth(this)
            Layout.preferredHeight : grid.prefHeight(this)
        }
    }
    
    }
    

Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.