Compatibility with older Qt versions

This commit is contained in:
Bill Somerville 2020-10-20 02:21:08 +01:00
parent 8d088cf4f5
commit 9b1695285d
No known key found for this signature in database
GPG Key ID: D864B06D1E81618F
1 changed files with 14 additions and 0 deletions

View File

@ -24,6 +24,7 @@ public:
{
}
#if QT_VERSION >= QT_VERSION_CHECK (5, 12, 0)
void showPopup () override
{
Q_EMIT about_to_show_popup ();
@ -35,6 +36,19 @@ public:
QComboBox::hidePopup ();
Q_EMIT popup_hidden ();
}
#else
void mousePressEvent (QMouseEvent * e) override
{
Q_EMIT about_to_show_popup ();
QComboBox::mousePressEvent (e);
}
void mouseReleaseEvent (QMouseEvent * e) override
{
QComboBox::mouseReleaseEvent (e);
Q_EMIT popup_hidden ();
}
#endif
};
#endif