QSS 自定义QMessageBox | 您所在的位置:网站首页 › 弹窗字体颜色 › QSS 自定义QMessageBox |
QGraphicsScene设置SceneRect
sanqima: QGraphicsScene的大小设置写的很好,给博主点赞。 QSS 自定义QLineEdit绝地武士007: 谢谢,当时想用QSS单独设置placeholder的样式。不过后来没有做这个功能 QSS 自定义QMessageBox有何不为: 查找QMessageBox源码可知与InformativeText对应的对象名是“qt_msgbox_informativelabel” [code=cpp] void QMessageBox::setInformativeText(const QString &text) { Q_D(QMessageBox); if (text.isEmpty()) { if (d->informativeLabel) { d->informativeLabel->hide(); d->informativeLabel->deleteLater(); } d->informativeLabel = 0; } else { if (!d->informativeLabel) { QLabel *label = new QLabel; label->setObjectName(QLatin1String("qt_msgbox_informativelabel")); label->setTextInteractionFlags(Qt::TextInteractionFlags(style()->styleHint(QStyle::SH_MessageBox_TextInteractionFlags, 0, this))); label->setAlignment(Qt::AlignTop | Qt::AlignLeft); label->setOpenExternalLinks(true); label->setWordWrap(true); #ifdef Q_OS_MAC // apply a smaller font the information label on the mac label->setFont(qt_app_fonts_hash()->value("QTipLabel")); #endif label [/code] QSS 自定义QMessageBoxkllo__: qmassagebox的InformativeText对象名是什么呢,这个是在哪查的 QSS 自定义QLineEdit有何不为: 可以 [code=css] qproperty-placeholderText: "HelloWorld"; [/code] |
CopyRight 2018-2019 实验室设备网 版权所有 |