Qt Forum

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

    Solved Qt5.9.3 QML App background transparent

    QML and Qt Quick
    2
    3
    722
    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.
    • A
      Alex_wang last edited by Alex_wang

      my QML app is rendering with eglfs-kms-egldevice plugin, and when setting the background to transparent,
      the UI background will be white on the screen.

      background to transparent:

      ApplicationWindow
      {
          id : mainWindow
      
          visible: true
          width: Screen.width
          height: Screen.height
         
          background:Rectangle
          {
              color : "#80030f14"
          }
      }
      
      1 Reply Last reply Reply Quote 0
      • jpnurmi
        jpnurmi last edited by

        A quote from ApplicationWindow::background docs:

        This property holds the background item.

        The background item is stacked under the content item, but above the background color of the window.

        The background item is useful for images and gradients, for example, but the color property is preferable for solid colors, as it doesn't need to create an item.

        A 1 Reply Last reply Reply Quote 1
        • A
          Alex_wang @jpnurmi last edited by

          @jpnurmi

          Hi, thanks for you, I have been solved it.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post