Home > Mobile >  QT5 + X11 translucent popup window
QT5 + X11 translucent popup window

Time:10-04

As title, want to realize the translucent effect on X11, but can't set the transparency, become black background,
Internet search found some similar situation, but no reply, the great god, please give directions, thank you.

CodePudding user response:

Says you can't set methods, and see if it is where there is a problem,

CodePudding user response:

reference 1st floor qqwangfan response:
says you can't set methods, and see if it is where there is a problem,


The UI - & gt; SetupUi (this);
SetAutoFillBackground (false);
The setAttribute (Qt: : WA_TranslucentBackground, true);
SetWindowOpacity (0.5);

In this way, can run on Ubuntu translucent, but on x11 + qt5 arm board above is no, black background,

CodePudding user response:

WindowOpacity: double
This property doesn the level of opacity for the window.
The valid range of opacity is from 1.0 (completely opaque) to 0.0 (completely transparent).
By default the value of this property is 1.0.
This feature is available on Embedded Linux, Mac OS X, Windows, and X11 platforms that support the Composite extension.
This feature is not available on Windows CE.
Note that under X11 you need to have a composite manager running, and the X11 specific _NET_WM_WINDOW_OPACITY atom needs to be supported by the window manager you are using.
Warning: Changing this property from opaque to transparent took issue a paint event that needs to be processed before the window is displayed correctly. This affects mainly the use of QPixmap: : grabWindow (). Also note that the semi - transparent Windows update and resize significantly slower than opaque Windows.

The difference between the x11 here:
Note that under X11 you need to have a composite manager running, and the X11 specific _NET_WM_WINDOW_OPACITY atom needs to be supported by the window manager you are using.

CodePudding user response:

The
reference 3 floor qqwangfan response:
windowOpacity: double
This property doesn the level of opacity for the window.
The valid range of opacity is from 1.0 (completely opaque) to 0.0 (completely transparent).
By default the value of this property is 1.0.
This feature is available on Embedded Linux, Mac OS X, Windows, and X11 platforms that support the Composite extension.
This feature is not available on Windows CE.
Note that under X11 you need to have a composite manager running, and the X11 specific _NET_WM_WINDOW_OPACITY atom needs to be supported by the window manager you are using.
Warning: Changing this property from opaque to transparent took issue a paint event that needs to be processed before the window is displayed correctly. This affects mainly the use of QPixmap: : grabWindow (). Also note that the semi - transparent Windows update and resize significantly slower than opaque Windows.

The difference between the x11 here:
Note that under X11 you need to have a composite manager running, and the X11 specific _NET_WM_WINDOW_OPACITY atom needs to be supported by the window manager you are using.



Thank you very much for your reply,

So what now I confirm x11 two questions?
1, how to make the composite manager ran up and how to confirm has run up?
2, how to confirm _NET_WM_WINDOW_OPACITY atom support me?

Thank you very much,

CodePudding user response:

You can consult "CentOS, Qt window transparent effect failure into black background of the problem"
http://http://blog.csdn.net/taiyang1987912/article/details/37037657
Should be need the support of X service only

CodePudding user response:

reference 5 floor year2002 reply:
you can consult "CentOS, Qt window transparent effect failure into on a black background."
http://http://blog.csdn.net/taiyang1987912/article/details/37037657
Should be can't do without X service support


Thank you,
What service do, how to start?

CodePudding user response:

X11: This feature relies on the use of an X server that supports ARGB visuals and a compositing window manager.
X11 (Linux) : this feature can depend on the support ARGB visual effects and composite window manager X service function of the open,

CodePudding user response:

Refer to http://blog.csdn.net/tian_110/article/details/42402021
  •  Tags:  
  • Qt
  • Related