Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

QML Button invisible on some systems



  • I have a weird behavior of my QML Button.

    I'm developing on a Redhat 7/VM machine via SSH/X11. On my system the dialog displays the buttons correctly. On the customer system, also RH7/VM but accessing via Spice protocol the button is not visible. Clicking on it performs the action that is defined.

    My suspicion is that it has something todo with the access of the machines (X11 vs. SPICE the default RH Remote Viewer).

    Rectangle {
       GridLayout {
          id: grid
          columns: 2
          anchors.top: toolbar.bottom
          anchors.left: parent.left
          anchors.right: parent.right
          anchors.bottom: parent.bottom
          Rectangle {
             id: leftTools
             Layout.alignment: Qt.AlignLeft | Qt.AlignTop
             width: 100
             color: "black"
             ...
             Button {
                id: layoutOpen
                anchors.top: layoutRectangle1.bottom
                text: "Open Layouts"
                
                MouseArea {
                    anchors.fill: parent
                    onClicked: {
                        openLayoutDialog.open()
                    }
                }
             ....
            }
       }
    }
    

    I tried several properties of the button (visible, opacity, color, ...) but nothing seemed to work. Does anyone has experienced the same?



  • Ok. Finally I managed to workaround the behavior.

    Thanks to a user that gave me the tip via PM. I replaced the Button by a Rectangle with MouseArea.


Log in to reply