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. ApplicationWindow: can not set Backgroundcolor to white

ApplicationWindow: can not set Backgroundcolor to white

Scheduled Pinned Locked Moved QML and Qt Quick
4 Posts 2 Posters 1.1k Views
  • 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 Offline
    L Offline
    lunatic fringe
    wrote on last edited by
    #1

    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
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      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
      0
      • L Offline
        L Offline
        lunatic fringe
        wrote on last edited by
        #3

        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
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          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
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved