-
-
Save anonymous/544e84fbcde5022a6878 to your computer and use it in GitHub Desktop.
Qt opacity
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class TestWidget : public QWidget | |
{ | |
public: | |
TestWidget(QWidget* parent = 0) : QWidget(parent) | |
{ | |
this->setWindowOpacity(.5); | |
} | |
}; | |
int main(int argc, char *argv[]) | |
{ | |
QApplication app(argc, argv); | |
TestWidget widget; | |
QCheckBox* checkBox = new QCheckBox(&widget); | |
checkBox->setObjectName(QStringLiteral("checkBox")); | |
checkBox->setGeometry(QRect(0, 0, 89, 20)); | |
widget.setGeometry(QRect(0, 0, 240, 320)); | |
widget.show(); | |
return app.exec(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment