Set transparent to image in frame.
-
@Bondrusiek
added this on my edit style sheet for QFrame
background-image: url(:/images/blue2.jpg);@Vineela Maybe try to use opacity property. For example:
"background-image: url(:/images/blue2.jpg); opacity: 127;"
In docs:
*The opacity for a widget. Possible values are from 0 (transparent) to 255 (opaque). For the moment, this is only supported for tooltips.If this property is not specified, it defaults to the value specified by the current style for the SH_ToolTipLabel_Opacity style hint.
Example:
QToolTip { opacity: 223 }*
https://doc.qt.io/archives/qt-4.8/stylesheet-reference.html -
It is not a big issue. Go to the settings, there you can change the background. You can take help from a Facebook blog or watch a video about this topic. It will help to solve the problem.
-
@Vineela Maybe try to use opacity property. For example:
"background-image: url(:/images/blue2.jpg); opacity: 127;"
In docs:
*The opacity for a widget. Possible values are from 0 (transparent) to 255 (opaque). For the moment, this is only supported for tooltips.If this property is not specified, it defaults to the value specified by the current style for the SH_ToolTipLabel_Opacity style hint.
Example:
QToolTip { opacity: 223 }*
https://doc.qt.io/archives/qt-4.8/stylesheet-reference.html@Bondrusiek nope my image is still like that only it didn't get transparent.
-
Hii . Try to change the image as transparent in online https://onlinepngtools.com/create-transparent-png
and then you may try it here in codesetStyleSheet("background:transparent"); setAttribute(Qt::WA_TranslucentBackground,true);
-
Hii . Try to change the image as transparent in online https://onlinepngtools.com/create-transparent-png
and then you may try it here in codesetStyleSheet("background:transparent"); setAttribute(Qt::WA_TranslucentBackground,true);
@sankarapandiyan how can i do that in style sheet than in cpp file this is only QT Designer no coding needed so.
-
@sankarapandiyan how can i do that in style sheet than in cpp file this is only QT Designer no coding needed so.
@Vineela
Hi
The easiest way is as @sankarapandiyan says.
Make is semi transparent in online editor and
then set on frame.
As far as i know, you cannot control transparency for background image using stylesheets. -
@Vineela
Hi
The easiest way is as @sankarapandiyan says.
Make is semi transparent in online editor and
then set on frame.
As far as i know, you cannot control transparency for background image using stylesheets.