Making transparent buttons
-
wrote on 14 Jun 2013, 22:20 last edited by
Hey, how can I set a QPushButton to be transparent, but the text inside to be visible. I have tried setting it transparent, but it turns black. I am trying to set it up where you cant see the button, allowing it to blend in with the background better. Thanks!
-
wrote on 14 Jun 2013, 23:29 last edited by
What about setting it "flat":http://qt-project.org/doc/qt-5.0/qtwidgets/qpushbutton.html#flat-prop ?
-
wrote on 15 Jun 2013, 04:48 last edited by
if nothing works, u can make use of qstylesheet
pushButton->setStyleSheet("QPushButton { border-image: url(:/icon/image.png); }");
and the image being transparent
this is not the right way, but it should work !!
-
wrote on 15 Jun 2013, 06:17 last edited by
Ok, thanks both of you!
-
if nothing works, u can make use of qstylesheet
pushButton->setStyleSheet("QPushButton { border-image: url(:/icon/image.png); }");
and the image being transparent
this is not the right way, but it should work !!