how to apply hover in button
-
HI,
I create a small window and apply style sheet using css file
but in button how to write apply a hover property
suppose i set background (ui->pushbutton->setstylesheet(style))
same way how to apply hover in coding side -
Hi,
u can try the link from SO:
https://stackoverflow.com/questions/19161119/using-hover-and-pressed-stylesheet-qt
Hope this helps
Thanks,
-
thank you @Pradeep-Kumar
i already applied ,this is ok
but i want coding part like
QString cs1="background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);";
ui->pushbutton->setstylesheet(cs1);same way how to write code in hover
-
thank you @Pradeep-Kumar
i already applied ,this is ok
but i want coding part like
QString cs1="background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);";
ui->pushbutton->setstylesheet(cs1);same way how to write code in hover
@Rameshguru said in how to apply hover in button:
QString cs1="background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);";
ui->pushbutton->setstylesheet(cs1);for example:
QString cs1="QPushButton {" "background-color: rgb(255, 255, 255);" "color: rgb(0, 0, 0);" "}" "QPushButton:hover {" "..." "}"; ui->pushbutton->setstylesheet(cs1);
-
@raven-worx ,@Pradeep-Kumar sir
now it,s properly working
Thank you sir