Unsolved How do I change the appearance of the widgets ?
-
So you are using QtWidgets after all? Or why do you ask about QtQuick? I'm confused.
Sorry I won't write that stylesheet for you. What you have looks like you've got pretty close to how the target looks. A few tweaks here and there and it should be roughly OK. To get a transparent window you'll need to set proper window attribute for your main widget (and it may not work on some platforms).
-
@sierdzio said in How do I change the appearance of the widgets ?:
window attribute
What do you mean by window attribute ?
-
@maniron
IIRC:
setAttribute(Qt::WA_TranslucentBackground, true); -
@maniron
Also please check windowOpacity. [ void setWindowOpacity(qreal level) ]You are also missing the
Layouts
&Alignments
.All the best
-
@j-hilk
It appears same even after setting the window attribute. -
@maniron said in How do I change the appearance of the widgets ?:
@j-hilk
It appears same even after setting the window attribute.You probably didn't specify alpha channel when setting
background-color
in your stylesheet. -
@maniron
Did you try to setWindowOpacity for your widget ? -
"You are also missing the Layouts & Alignments."
I'm doing a sample and my main aim is not the layout and allignment, i need to achieve that colour.
"Also please check windowOpacity. [ void setWindowOpacity(qreal level) ]"
I'm trying this out will let you know if it works or not.
thank you for your time
-
sorry sierdzio, setting the attribute is working but it makes the window completely transparent. And I'm specifying the alpha channel also.
-
@maniron said in How do I change the appearance of the widgets ?:
sorry sierdzio, setting the attribute is working but it makes the window completely transparent. And I'm specifying the alpha channel also.
are you sure?
setWindowOpacity
makes the complete window (including child widgets) transparent, WA_TranslucentBackground should only effect the backgroundmaybe sharing some code, would be helpful
-
@maniron Please share some sample code.