AmonRaNet / QGeoView

QGeoView is a Qt / C ++ widget for visualizing geographic data.
GNU Lesser General Public License v3.0
155 stars 60 forks source link

Have you tried to build the project in qt6.2? #12

Closed comiquita closed 2 years ago

comiquita commented 3 years ago

I'm trying to build the project in qt6.2 but I'm getting tons of errors.

e.g. ../../QGeoView/lib/src/QGVMapQGView.cpp:242:40: error: no member named 'pos' in 'QWheelEvent' mWheelMouseArea = QRect(event->pos(), QSize(1, 1))

../../QGeoView/lib/src/QGVMapQGView.cpp:256:16: error: no member named 'delta' in 'QWheelEvent' if (event->delta() > 0) {

embeddedmz commented 3 years ago

Because the API changed between Qt5 and Qt6 : https://doc-snapshots.qt.io/qt6-dev/qwheelevent.html https://doc.qt.io/qt-5/qwheelevent.html

Stick to Qt5

comiquita commented 3 years ago

Yes, you're correct.

The problem is I need to use qt6.2 since I have a requirement to develop a project (related to slippy maps) in qt6.2.

AmonRaNet commented 2 years ago

If it is only problem - it could be easy to fix :)

bakerb845 commented 2 years ago

Hey Comiquita, I've been using qgeoview for a while in qt 6.x. I recall there were like 4 files that required changes which should be attached. It's not immediately clear to me how CMake could toggle between qt5 and qt6 automagically. Cheers

filesToUpdate.gz

AmonRaNet commented 2 years ago

Hey Comiquita, I've been using qgeoview for a while in qt 6.x. I recall there were like 4 files that required changes which should be attached. It's not immediately clear to me how CMake could toggle between qt5 and qt6 automagically. Cheers

filesToUpdate.gz

@bakerb845 I have fast checked your code - looks promising for me - you can open PR with your changes. cmake cant toggle automagically between Qt5 or Qt6 from cmake file itself, because it is environment variable (path to package). It is same story for qmake

AmonRaNet commented 2 years ago

Master is updated and Qt6 now should be supported. Thanks to @bakerb845!