how to change background color of a label in QT -


i developing calculator using qt framework. have put label display entered number , answer want change color of label. how can that.

label = new qlabel("0",this);//label text inputs label -> setgeometry(qrect(qpoint(75,25),qsize(50,200))); 

please help

you can use qt style sheets

qlabel* label = new qlabel("hello"); label->setstylesheet("background: red"); 

Comments

Popular posts from this blog

javascript - Karma not able to start PhantomJS on Windows - Error: spawn UNKNOWN -

Nuget pack csproj using nuspec -

c# - Display ASPX Popup control in RowDeleteing Event (ASPX Gridview) -