Hi,
I want to draw a semi-transparent child QPushButton on top of a parent Widget which inherits from QGLWidget and repaints itsself every 20ms. The parent widget is implemented in the opensource Project OpenSceneGraph. The following codes are used:
***
ui.setupUi(this);
ui.pushButton->setAutoFillBackground(true);
ui.pushButton->setFlat(true);
ui.pushButton->setStyleSheet("background-color:transparent");
***
then the result is a fully black button on front of the parent widget but not a semi-transparent button(as shown in attachment fig.1). When it comes with the condition of two overlapped QPushButton, the code works well that the upper button is a semi-transparent(fig.2). The follwing two attachments show the result of my code.
Is there anything wrong with my code settings?(winwods 7 x64, vs 2010,qt 4.8.5)
QQ图片20131105102738.jpgQQ图片20131105102734.jpg
Bookmarks