Is there a way to make the window of a qml application transparent?
I'm looking for a detailed description on how to draw simple shapes with qml while making the window of the application transparent, as well as the background. A working source code demo would be awesome.
Creating and Running QML Projects For simple UI files such as this one, select File > New File or Project > Application (Qt Quick) > Qt Quick Application - Empty from within Qt Creator. Pressing the green Run button runs the application. You should see the text Hello, World! in the center of a red rectangle.
To build applications for mobile devices, select kits also for Android and iOS. Note: Kits are listed if they have been specified in Edit > Preferences > Kits (on Windows and Linux) or in Qt Creator > Preferences > Kits (on macOS). For more information, see Adding Kits.
As of at least Qt 5.3 you don't need anything as elaborate as in the previous answers:
Window { flags: Qt.ToolTip | Qt.FramelessWindowHint | Qt.WA_TranslucentBackground color: "#00000000"
Job done. (You might want to change ToolTip
. I'm using it because I'm making tooltips.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With