Qt 6 works on Windows host

This commit is contained in:
2022-01-23 12:59:57 +03:00
parent fcdc142991
commit bdb2acb414
14 changed files with 139 additions and 34 deletions

View File

@@ -41,7 +41,13 @@ void ColorButton::resizeEvent(QResizeEvent * ) {
void ColorButton::mousePressEvent(QMouseEvent * e) {
pp = e->pos();
if (e->buttons().testFlag(Qt::RightButton)) {
menu.popup(e->globalPos());
menu.popup(
#if QT_VERSION_MAJOR <= 5
((QMouseEvent*)e)->globalPos()
#else
((QMouseEvent*)e)->globalPosition().toPoint()
#endif
);
return;
}
QPushButton::mousePressEvent(e);