Gui: Qt6 port
* QString::indexOf() is now marked as [[nodiscard]] * Replace deprecated methods of QMessageBox * QMouseEvent::globalPos() is deprecated, use globalPosition().toPoint() * QWidget::enterEvent() requires a QEnterEvent as argument * QLibraryInfo::location() is deprecated, use path() * QVariant::Type is deprecated, use QMetaType::Type * QVariant::canConvert(int) is deprecated, use QVariant::canConvert(QMetaType) or QVariant::canConvert<T>() * QMessageBox::standardIcon is deprecated, use QStyle::standardIcon() * Replace deprecated method QMessageBox::question(), ... * QApplication::fontMetrics() is deprecated * QDropEvent::mouseButtons() is deprecated, use buttons() * QDropEvent::keyboardModifiers() is deprecated, use modifiers() * Constructor of QFontDatabase is deprecated, use static methods instead * Qt::AA_DisableHighDpiScaling is deprecated * Qt::AA_EnableHighDpiScaling is deprecated * Qt::AA_UseHighDpiPixmaps is deprecated
This commit is contained in:
@@ -132,7 +132,11 @@ void Flag::resizeEvent(QResizeEvent* e)
|
||||
void Flag::mouseMoveEvent(QMouseEvent *e)
|
||||
{
|
||||
if (e->buttons() & Qt::LeftButton) {
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6,0,0)
|
||||
move(e->globalPos() - dragPosition);
|
||||
#else
|
||||
move(e->globalPosition().toPoint() - dragPosition);
|
||||
#endif
|
||||
e->accept();
|
||||
auto viewer = dynamic_cast<View3DInventorViewer*>(parentWidget());
|
||||
if (viewer)
|
||||
@@ -143,7 +147,11 @@ void Flag::mouseMoveEvent(QMouseEvent *e)
|
||||
void Flag::mousePressEvent(QMouseEvent *e)
|
||||
{
|
||||
if (e->button() == Qt::LeftButton) {
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6,0,0)
|
||||
dragPosition = e->globalPos() - frameGeometry().topLeft();
|
||||
#else
|
||||
dragPosition = e->globalPosition().toPoint() - frameGeometry().topLeft();
|
||||
#endif
|
||||
e->accept();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user