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

ApplicationWindow: can not set Backgroundcolor to white



  • I can change the background color with the color property in the ApplicationWindow. The only color which has no effect is "white". If i use "#FFFFFE" it is like white. Why is "#FFFFFF" ignored as background color ?


  • Lifetime Qt Champion

    Hi,

    Can you show the code where you set that color ?

    Also, what OS/Qt combo are you using ?



  • It happens on Win 7 with Qt 5.3

    changing line 10 to : color : "#FFFFFF" the background changed to a gray color

    @import QtQuick 2.3
    import QtQuick.Controls 1.2

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

    color: "#FFFFFE"
    
    menuBar: MenuBar {
        Menu {
            title: qsTr("File")
            MenuItem {
                text: qsTr("&Open")
                onTriggered: console.log("Open action triggered");
            }
            MenuItem {
                text: qsTr("Exit")
                onTriggered: Qt.quit();
            }
        }
    }
    
    Text {
        text: qsTr("Hello World")
        anchors.centerIn: parent
    }
    

    }
    @


  • Lifetime Qt Champion

    Indeed, looks like there's something strange going on. You should take a look at the "bug report system":http://bugreports.qt-project.org to see if something known.


Log in to reply