Qt6: QEnterEvent

This commit is contained in:
tobtoht 2022-05-24 17:32:42 +02:00
parent 46d2228541
commit 5c1fda7310
No known key found for this signature in database
GPG key ID: 1CADD27F41F45C3C
2 changed files with 8 additions and 0 deletions

View file

@ -89,7 +89,11 @@ void HelpLabel::mouseReleaseEvent(QMouseEvent *event)
QMessageBox::information(this, "Help", this->help_text);
}
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
void HelpLabel::enterEvent(QEvent *event)
#else
void HelpLabel::enterEvent(QEnterEvent *event)
#endif
{
font.setUnderline(true);
setFont(font);

View file

@ -102,7 +102,11 @@ public:
protected:
void mouseReleaseEvent(QMouseEvent *event) override;
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
void enterEvent(QEvent *event) override;
#else
void enterEvent(QEnterEvent *event) override;
#endif
void leaveEvent(QEvent *event) override;
};