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. Qt5.0 or newer-- how to create a transparent window use qml
Forum Updated to NodeBB v4.3 + New Features

Qt5.0 or newer-- how to create a transparent window use qml

Scheduled Pinned Locked Moved QML and Qt Quick
4 Posts 2 Posters 1.4k Views 1 Watching
  • 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.
  • K Offline
    K Offline
    kern0516
    wrote on last edited by
    #1

    i googled some solution but only for qt 4.x
    for example:
    QmlApplicationViewer view;
    view.setWindowFlags(Qt::FramelessWindowHint);
    view.setAttribute(Qt::WA_TranslucentBackground);
    view.setStyleSheet("background:transparent;");

    and in qt 5.0 the view class is "QtQuick2ApplicationViewer"
    how to use that, can anyone give me some help
    some code snippet is best

    thanks

    1 Reply Last reply
    0
    • V Offline
      V Offline
      Vincent007
      wrote on last edited by
      #2

      opacity: 0

      1 Reply Last reply
      0
      • K Offline
        K Offline
        kern0516
        wrote on last edited by
        #3

        thanks,

        but this attribute might affect the items in this window
        i want to show a png witch has shadow border

        1 Reply Last reply
        0
        • V Offline
          V Offline
          Vincent007
          wrote on last edited by
          #4

          color: "#00000000" // ARGB fully transparent

          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