From c288d9319bc94e4ac5778ea7054bdf042e4bd535 Mon Sep 17 00:00:00 2001 From: Uwe Rathmann Date: Tue, 7 Mar 2023 13:52:03 +0100 Subject: [PATCH] Qt5 build break fixed --- src/controls/QskComboBox.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/controls/QskComboBox.cpp b/src/controls/QskComboBox.cpp index 17da7071..38b3a219 100644 --- a/src/controls/QskComboBox.cpp +++ b/src/controls/QskComboBox.cpp @@ -325,7 +325,18 @@ void QskComboBox::wheelEvent( QWheelEvent* event ) if ( isPopupOpen() ) { if ( m_data->menu ) - QCoreApplication::postEvent( m_data->menu, event->clone() ); + { +#if QT_VERSION < QT_VERSION_CHECK( 6, 0, 0 ) + auto wheelEvent = new QWheelEvent( + event->position(), event->globalPosition(), + event->pixelDelta(), event->angleDelta(), + event->buttons(), event->modifiers(), + event->phase(), event->inverted(), event->source() ); +#else + auto wheelEvent = event->clone(); +#endif + QCoreApplication::postEvent( m_data->menu, wheelEvent ); + } } else {