Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    ApplicationWindow: can not set Backgroundcolor to white

    QML and Qt Quick
    2
    4
    886
    Loading More Posts
    • 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.
    • L
      lunatic fringe last edited by

      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 ?

      1 Reply Last reply Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        Hi,

        Can you show the code where you set that color ?

        Also, what OS/Qt combo 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

        1 Reply Last reply Reply Quote 0
        • L
          lunatic fringe last edited by

          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
          }
          

          }
          @

          1 Reply Last reply Reply Quote 0
          • SGaist
            SGaist Lifetime Qt Champion last edited by

            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.

            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 Reply Quote 0
            • First post
              Last post