qml error
-
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 } } }
-
@jchaviano
This is the image of the previous code
This is the image of the previous code with the bug
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 -
Which version of Qt are you using ?
-
@jchaviano said in qml error:
@SGaist
That is very important for me... and for other future usersIn what way is that related to the fact that you did not answer my question ?
-
@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.
-
@jchaviano as suggested, you should start by updating Qt to a more recent version.
-
@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