how to set the background color equal to background color of stylesheets
-
This post is deleted!
-
My back ground color is wrong
color1.red 255 color gree 255 color blue 255 but in actual my background is grey how to get background color as grey
-
the solution is in your previous post :
// QColor rgb(150,150,150);
but you commented it outDo you understand the concept of RGB color values?
-
@Eddy I do understand the RGB values concept . but I do not want to set a harcorred color .,I want to keep the color of QLIneEdit same as that of it background , with out harding the RGB values my concern is
QColor rgb(QWidget::palette().color(QWidget::backgroundRole())); is not giving me proper background color of the frame ? how to get that -
This post is deleted!
-
@Qt-Enthusiast
We already gave you the solution to that question in another postDid you try it? What is not ok with that solution?
-
no the color mismacthes from background and it is not perfect macth
-
You should do somethig like this
std:string clr = "background-color: rgb(" + std::to_string(color.red()) + "," + std::to_string(color.green()) + "," + std::to_string(color.blue()) + "); border: 0px;";
setStyleSheet(clr.c_str());Another way:
setStyleSeet("background-color: transparent; border 0px;");
-
I will try