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. qml error
Forum Updated to NodeBB v4.3 + New Features

qml error

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
15 Posts 2 Posters 955 Views 1 Watching
  • 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.
  • J jchaviano

    why in qml when working with combobox it gives me this error. It's not that the app is bad but if you are a customer user this scares you...qml error.png

    J Offline
    J Offline
    jchaviano
    wrote on last edited by JKSH
    #2

    @jchaviano

    this is a simple code for ilustrate the problem...

    You need to click several times on the combobox to see the blinking error of the components when redering and in some cases the rainbow of colors in the previous image

    import QtQuick 2.12
    import QtQuick.Window 2.12
    import QtQuick.Controls 2.12
    
    Window {
        visible: true
        width: 1024
        height: 600
        title: qsTr("error qml")
        minimumHeight : 800
        minimumWidth : 1024
    
        Rectangle {
            color: "#CCCCCC"
            anchors.fill: parent
            Rectangle {
                id: header
                color: "red"
                implicitWidth: parent.width
                height: 60
                Rectangle {
                    id: contenedorbuttons
                    color: "#E6E6E6"
                    implicitWidth: parent.width * 0.95
                    implicitHeight: parent.height * 0.9
                    anchors.centerIn: parent
                }
            }
            Rectangle {
                id: arejob
                color: "#CCCCCC"
                implicitWidth: parent.width
                anchors.top: header.bottom
                anchors.bottom: futter.top
                Row {
                    anchors.centerIn: parent
                    spacing: 1
                    Rectangle{
                        implicitWidth: contenedorbuttons.width-40
                        height: 38
                        border.color: "blue"
                        Row{
                            anchors.centerIn: parent
                            anchors.fill: parent
                            Rectangle{
                                implicitWidth: parent.width/2
                                height: 40
                                color: "green"
                                border.color: "black"
                                ComboBox{
                                    implicitWidth: parent.width;
                                    model: ["First", "Second", "Third"]
                                }
                            }
                            Rectangle{
                                implicitWidth: parent.width/2
                                height: 40
                                ComboBox{
                                    id: idcomboboxadb
                                    implicitWidth: parent.width;
                                    model: ["First", "Second", "Third"]
                                    //  valueRole: "portName"
    
                                }
                            }
                        }
                    }
                }
    
            }
            Rectangle {
                id: futter
                color: "blue"
                implicitWidth: parent.width
                height: 30
                anchors.bottom: parent.bottom
    
            }
        }
    }
    
    SGaistS J 2 Replies Last reply
    0
    • J jchaviano

      @jchaviano

      this is a simple code for ilustrate the problem...

      You need to click several times on the combobox to see the blinking error of the components when redering and in some cases the rainbow of colors in the previous image

      import QtQuick 2.12
      import QtQuick.Window 2.12
      import QtQuick.Controls 2.12
      
      Window {
          visible: true
          width: 1024
          height: 600
          title: qsTr("error qml")
          minimumHeight : 800
          minimumWidth : 1024
      
          Rectangle {
              color: "#CCCCCC"
              anchors.fill: parent
              Rectangle {
                  id: header
                  color: "red"
                  implicitWidth: parent.width
                  height: 60
                  Rectangle {
                      id: contenedorbuttons
                      color: "#E6E6E6"
                      implicitWidth: parent.width * 0.95
                      implicitHeight: parent.height * 0.9
                      anchors.centerIn: parent
                  }
              }
              Rectangle {
                  id: arejob
                  color: "#CCCCCC"
                  implicitWidth: parent.width
                  anchors.top: header.bottom
                  anchors.bottom: futter.top
                  Row {
                      anchors.centerIn: parent
                      spacing: 1
                      Rectangle{
                          implicitWidth: contenedorbuttons.width-40
                          height: 38
                          border.color: "blue"
                          Row{
                              anchors.centerIn: parent
                              anchors.fill: parent
                              Rectangle{
                                  implicitWidth: parent.width/2
                                  height: 40
                                  color: "green"
                                  border.color: "black"
                                  ComboBox{
                                      implicitWidth: parent.width;
                                      model: ["First", "Second", "Third"]
                                  }
                              }
                              Rectangle{
                                  implicitWidth: parent.width/2
                                  height: 40
                                  ComboBox{
                                      id: idcomboboxadb
                                      implicitWidth: parent.width;
                                      model: ["First", "Second", "Third"]
                                      //  valueRole: "portName"
      
                                  }
                              }
                          }
                      }
                  }
      
              }
              Rectangle {
                  id: futter
                  color: "blue"
                  implicitWidth: parent.width
                  height: 30
                  anchors.bottom: parent.bottom
      
              }
          }
      }
      
      SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #3

      Hi,

      Can you show what your application should look like ?
      I have tried it a bit using qmlscene and it does not seem to do much in terms of flicking (6.5.0 on macOS)

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • J jchaviano

        @jchaviano

        this is a simple code for ilustrate the problem...

        You need to click several times on the combobox to see the blinking error of the components when redering and in some cases the rainbow of colors in the previous image

        import QtQuick 2.12
        import QtQuick.Window 2.12
        import QtQuick.Controls 2.12
        
        Window {
            visible: true
            width: 1024
            height: 600
            title: qsTr("error qml")
            minimumHeight : 800
            minimumWidth : 1024
        
            Rectangle {
                color: "#CCCCCC"
                anchors.fill: parent
                Rectangle {
                    id: header
                    color: "red"
                    implicitWidth: parent.width
                    height: 60
                    Rectangle {
                        id: contenedorbuttons
                        color: "#E6E6E6"
                        implicitWidth: parent.width * 0.95
                        implicitHeight: parent.height * 0.9
                        anchors.centerIn: parent
                    }
                }
                Rectangle {
                    id: arejob
                    color: "#CCCCCC"
                    implicitWidth: parent.width
                    anchors.top: header.bottom
                    anchors.bottom: futter.top
                    Row {
                        anchors.centerIn: parent
                        spacing: 1
                        Rectangle{
                            implicitWidth: contenedorbuttons.width-40
                            height: 38
                            border.color: "blue"
                            Row{
                                anchors.centerIn: parent
                                anchors.fill: parent
                                Rectangle{
                                    implicitWidth: parent.width/2
                                    height: 40
                                    color: "green"
                                    border.color: "black"
                                    ComboBox{
                                        implicitWidth: parent.width;
                                        model: ["First", "Second", "Third"]
                                    }
                                }
                                Rectangle{
                                    implicitWidth: parent.width/2
                                    height: 40
                                    ComboBox{
                                        id: idcomboboxadb
                                        implicitWidth: parent.width;
                                        model: ["First", "Second", "Third"]
                                        //  valueRole: "portName"
        
                                    }
                                }
                            }
                        }
                    }
        
                }
                Rectangle {
                    id: futter
                    color: "blue"
                    implicitWidth: parent.width
                    height: 30
                    anchors.bottom: parent.bottom
        
                }
            }
        }
        
        J Offline
        J Offline
        jchaviano
        wrote on last edited by jchaviano
        #4

        @jchaviano
        This is the image of the previous code
        error.png
        This is the image of the previous code with the bug
        error.png
        Only by moving the mouse over an area or clicking on some component does the app repaint. but the colors of the components should not be lost

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #5

          Which version of Qt are you using ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          J 1 Reply Last reply
          0
          • SGaistS SGaist

            Which version of Qt are you using ?

            J Offline
            J Offline
            jchaviano
            wrote on last edited by
            #6

            @SGaist otra foto.png

            SGaistS 1 Reply Last reply
            0
            • J jchaviano

              @SGaist otra foto.png

              SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #7

              These are the information about Qt Creator. I am requesting the information about the Qt version you use to build your application.

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              J 1 Reply Last reply
              0
              • SGaistS SGaist

                These are the information about Qt Creator. I am requesting the information about the Qt version you use to build your application.

                J Offline
                J Offline
                jchaviano
                wrote on last edited by
                #8

                @SGaist
                That is very important for me... and for other future users

                SGaistS 1 Reply Last reply
                0
                • J jchaviano

                  @SGaist
                  That is very important for me... and for other future users

                  SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #9

                  @jchaviano said in qml error:

                  @SGaist
                  That is very important for me... and for other future users

                  In what way is that related to the fact that you did not answer my question ?

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  J 1 Reply Last reply
                  0
                  • SGaistS SGaist

                    @jchaviano said in qml error:

                    @SGaist
                    That is very important for me... and for other future users

                    In what way is that related to the fact that you did not answer my question ?

                    J Offline
                    J Offline
                    jchaviano
                    wrote on last edited by
                    #10

                    @SGaist 27513bf4-576d-4ff4-a04b-81f9e912a03a-image.png
                    this is you needed

                    SGaistS 1 Reply Last reply
                    0
                    • J jchaviano

                      @SGaist 27513bf4-576d-4ff4-a04b-81f9e912a03a-image.png
                      this is you needed

                      SGaistS Offline
                      SGaistS Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on last edited by
                      #11

                      @jchaviano no again, this is Qt Creator's information. Which Qt version are you using to build your application ? Go to the project panel to see that information.

                      Based on the Qt Creator version I would guess that it's likely an old version of Qt so the first thing you should do is update to a more recent version.

                      Interested in AI ? www.idiap.ch
                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                      J 1 Reply Last reply
                      0
                      • SGaistS SGaist

                        @jchaviano no again, this is Qt Creator's information. Which Qt version are you using to build your application ? Go to the project panel to see that information.

                        Based on the Qt Creator version I would guess that it's likely an old version of Qt so the first thing you should do is update to a more recent version.

                        J Offline
                        J Offline
                        jchaviano
                        wrote on last edited by
                        #12

                        @SGaist b620acb8-7841-4869-8b95-188604c06123-image.png

                        SGaistS 1 Reply Last reply
                        0
                        • J jchaviano

                          @SGaist b620acb8-7841-4869-8b95-188604c06123-image.png

                          SGaistS Offline
                          SGaistS Offline
                          SGaist
                          Lifetime Qt Champion
                          wrote on last edited by
                          #13

                          @jchaviano as suggested, you should start by updating Qt to a more recent version.

                          Interested in AI ? www.idiap.ch
                          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                          J 2 Replies Last reply
                          0
                          • SGaistS SGaist

                            @jchaviano as suggested, you should start by updating Qt to a more recent version.

                            J Offline
                            J Offline
                            jchaviano
                            wrote on last edited by
                            #14

                            @SGaist
                            ok

                            1 Reply Last reply
                            0
                            • SGaistS SGaist

                              @jchaviano as suggested, you should start by updating Qt to a more recent version.

                              J Offline
                              J Offline
                              jchaviano
                              wrote on last edited by
                              #15

                              @SGaist I have some way by code that when clicked repaints the components. as a refresher if in the end the bug doesn't always appear and when I move the mouse over another component the paint is updated correctly. My question, I cannot force qml to repaint itself when clicking on the combobox

                              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