Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Choose QtQuick.Controls 1.4 for CheckBox
QtWS25 Last Chance

Choose QtQuick.Controls 1.4 for CheckBox

Scheduled Pinned Locked Moved Solved QML and Qt Quick
8 Posts 2 Posters 1.7k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    Galbarad
    wrote on last edited by
    #1

    Hi all
    I have qml window with TableView (QtQuick.Controls 1.4), but I want ToolTip also (QtQuick.Controls 2.0)
    but I have few CheckBox and ComboBox components on my form too.
    So question is possible choose CheckBox and ComboBox from QtQuick.Controls 1.4 to use on my form or no?
    Qt 5.7.
    thanks

    1 Reply Last reply
    0
    • dheerendraD Offline
      dheerendraD Offline
      dheerendra
      Qt Champions 2022
      wrote on last edited by
      #2

      You can use delegate in each of the columns of TableView

      TableViewColumn{role : "showme";title :"Select";width:80;
      delegate: CheckBox{}
      }

      Dheerendra
      @Community Service
      Certified Qt Specialist
      http://www.pthinks.com

      G 1 Reply Last reply
      5
      • dheerendraD dheerendra

        You can use delegate in each of the columns of TableView

        TableViewColumn{role : "showme";title :"Select";width:80;
        delegate: CheckBox{}
        }

        G Offline
        G Offline
        Galbarad
        wrote on last edited by
        #3

        hi @dheerendra
        thank you for answer
        yes I'm use delegate item, something like this
        but problem that this CheckBox is from Controls 2.0 but I want CheckBox from Controls 1.4
        is this possible?

        Component {
                    id: cbdDeploymentStatus
                    CheckBox {
                        // this check box from Controls 2.0 
                        // but I want, Contorol 1.4
                        // is this possible?
                    }
                }
        
        1 Reply Last reply
        1
        • dheerendraD Offline
          dheerendraD Offline
          dheerendra
          Qt Champions 2022
          wrote on last edited by
          #4

          Try something like this ?

          import QtQuick 2.6
          import QtQuick.Window 2.2
          import QtQuick.Controls 2.0
          import QtQuick.Controls 1.2 as Controls12

          Window {
          visible: true
          width: 640
          height: 480
          title: qsTr("Hello World")

          Controls12.CheckBox {
              text : "Hell20"
          }
          CheckBox{
              x  : 100
              text : "Hell20"
          }
          
          Text {
              text: qsTr("Hello World")
              anchors.centerIn: parent
          }
          

          }

          Dheerendra
          @Community Service
          Certified Qt Specialist
          http://www.pthinks.com

          G 1 Reply Last reply
          7
          • dheerendraD dheerendra

            Try something like this ?

            import QtQuick 2.6
            import QtQuick.Window 2.2
            import QtQuick.Controls 2.0
            import QtQuick.Controls 1.2 as Controls12

            Window {
            visible: true
            width: 640
            height: 480
            title: qsTr("Hello World")

            Controls12.CheckBox {
                text : "Hell20"
            }
            CheckBox{
                x  : 100
                text : "Hell20"
            }
            
            Text {
                text: qsTr("Hello World")
                anchors.centerIn: parent
            }
            

            }

            G Offline
            G Offline
            Galbarad
            wrote on last edited by
            #5

            hi @dheerendra thanks for answer
            yep I try this
            but take error "Invalid import qualifier ID" with such instruction

            1 Reply Last reply
            1
            • dheerendraD Offline
              dheerendraD Offline
              dheerendra
              Qt Champions 2022
              wrote on last edited by
              #6

              Did u try my sample. Did that work ?

              Dheerendra
              @Community Service
              Certified Qt Specialist
              http://www.pthinks.com

              G 1 Reply Last reply
              4
              • dheerendraD dheerendra

                Did u try my sample. Did that work ?

                G Offline
                G Offline
                Galbarad
                wrote on last edited by
                #7

                hi @dheerendra
                yep it's work!!! great
                but I try this by myself yesterday, but nothing work))
                are you wizard?))
                thank you

                1 Reply Last reply
                1
                • G Offline
                  G Offline
                  Galbarad
                  wrote on last edited by
                  #8

                  @dheerendra said in Choose QtQuick.Controls 1.4 for CheckBox:

                  as Controls12

                  Alias should start with upper case

                  import QtQuick.Controls 1.4 as Controls12 // work
                  
                  import QtQuick.Controls 1.4 as controls12 // not work
                  
                  1 Reply Last reply
                  0

                  • Login

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • Users
                  • Groups
                  • Search
                  • Get Qt Extensions
                  • Unsolved