Qt - INFO按钮悬停鼠标

时间:2022-02-08 20:25:43

Qt - HELP with button hover with mouse.

Qt - 帮助按钮悬停鼠标。

I want make something like INFO BOX about button, when user will hover it with mouse (hover like in HTML/CSS).

当用户将鼠标悬停在鼠标上时(我喜欢在HTML / CSS中悬停),我想制作类似INFO BOX的按钮。

Something like this in Qt Creator when we HOVER some reference.

当我们提到一些参考时,在Qt Creator中有类似的东西。

1 个解决方案

#1


0  

you can use QWidget::setToolTip(const QString&), i.e.

你可以使用QWidget :: setToolTip(const QString&),即

QToolButton* button = new QToolButton(this);
button->setToopTip("Button");

#1


0  

you can use QWidget::setToolTip(const QString&), i.e.

你可以使用QWidget :: setToolTip(const QString&),即

QToolButton* button = new QToolButton(this);
button->setToopTip("Button");