[英]How to place an image on the corner of QGroupBox - StyleSheet
I wanted to know if its possible to display an image instead of text in QGroupBox I want to achieve the following style 我想知道是否可以在QGroupBox中显示图像而不是文本,但我想实现以下样式
Any suggestions ? 有什么建议么 ?
http://qt-project.org/doc/qt-4.8/stylesheet-examples.html#customizing-qgroupbox http://qt-project.org/doc/qt-4.8/stylesheet-examples.html#customizing-qgroupbox
You could try something like: 您可以尝试类似:
groupBox->setStyleSheet(
"QGroupBox::indicator {"
"width: 13px;"
"height: 13px;"
"}"
"QGroupBox::indicator:unchecked {"
"image: url(:/images/checkbox_unchecked.png);"
"}"
);
Hope that helps. 希望能有所帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.