且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何自定义样式表 QToolTip

更新时间:2022-12-11 20:11:15

您需要为 QToolTip 添加样式表.例如:

You need add style sheet for QToolTip. Ex.:

QString style = QString(
    "QPushButton {"
    // StyleSheet for your push button
    "    background: blue;"
    "}"
    "QToolTip {"
    // StyleSheet for tool tip
    "    background: red;"
    "}"
    );

this->cellGUI.status_label->setStyleSheet(style);