[QWT] qwt-6.1.4 doesn't compile on Qt6.8.2 / mingw1310_64 on Windows 10
Solved
3rd Party Software
-
When I compile qwt-6.1.4, I get this error:
qwt_painter.cpp:29:10: fatal error: qdesktopwidget.h: No such file or directory
29 | #include <qdesktopwidget.h>Here I see QDesktopWidget has been removed:
https://stackoverflow.com/questions/74163821/qt-qdesktopwidget-file-not-found
https://doc.qt.io/qt-6/widgets-changes-qt6.htmlCommands:
qmake qwt.pro mingw32-make -j
Versions:
qwt-6.1.4 qt 6.8.2 mingw1310_64 Windows 10 Pro 22H2 19045.5487
Terminal output:
Setting up environment for Qt usage... C:\Qt\6.8.2\mingw_64>cd "c:\Users\cedric\Downloads\qwt-6.1.4\qwt-6.1.4" c:\Users\cedric\Downloads\qwt-6.1.4\qwt-6.1.4>qmake qwt.pro Info: creating stash file C:\Users\cedric\Downloads\qwt-6.1.4\qwt-6.1.4\.qmake.stash c:\Users\cedric\Downloads\qwt-6.1.4\qwt-6.1.4>mingw32-make -j cd src\ && ( if not exist Makefile C:\Qt\6.8.2\mingw_64\bin\qmake.exe -o Makefile C:\Users\cedric\Downloads\qwt-6.1.4\qwt-6.1.4\src\src.pro ) && mingw32-make -f Makefile mingw32-make[1]: Entering directory 'c:/Users/cedric/Downloads/qwt-6.1.4/qwt-6.1.4/src' mingw32-make -f Makefile.Release all mingw32-make -f Makefile.Debug all mingw32-make[2]: Entering directory 'c:/Users/cedric/Downloads/qwt-6.1.4/qwt-6.1.4/src' mingw32-make[2]: Entering directory 'c:/Users/cedric/Downloads/qwt-6.1.4/qwt-6.1.4/src' compiling qwt_abstract_scale_draw.cpp compiling qwt_abstract_scale_draw.cpp compiling qwt_clipper.cpp compiling qwt_clipper.cpp <snip> compiling qwt_plot_abstract_barchart.cpp compiling qwt_plot_barchart.cpp compiling qwt_plot_multi_barchart.cpp compiling qwt_plot_zoneitem.cpp compiling qwt_plot_spectrogram.cpp qwt_painter.cpp:29:10: fatal error: qdesktopwidget.h: No such file or directory 29 | #include <qdesktopwidget.h> | ^~~~~~~~~~~~~~~~~~ compilation terminated. compiling qwt_plot_spectrocurve.cpp compiling qwt_plot_scaleitem.cpp qwt_date_scale_engine.cpp:compiling qwt_plot_legenditem.cpp <snip> compiling qwt_plot_directpainter.cpp compiling qwt_wheel.cpp qwt_date_scale_draw.cpp: In member function ' me QwtDateScaleEngine::QwtDynGridLayout::voidIn file included from qwt_magnifier.cpp: In member function 'virtual void QwtMagnifier::widgetWheelEvent(QWheelEvent*)': qwt_magnifier.cpp:441:31: error: 'class QWheelEvent' has no member named 'delta' 441 | qAbs( wheelEvent->delta() / 120.0 ) ); | ^~~~~ qwt_magnifier.cpp:443:26: error: 'class QWheelEvent' has no member named 'delta' 443 | if ( wheelEvent->delta() > 0 ) | ^~~~~ (const QPointF&, double) const qwt_dyngrid_layout.cpp: :6240: release/qwt_date.o] Error 1 <snip> qwt_plot_renderer.cpp:820:22:error: error: marginaggregate ' QPainterPath clipPathQMargins' has incomplete type and cannot be defined 820 | QPainterPath 562 | int h = 2 * clipPathmargin; | | ^~~~~~~~^~~~~~ | QMarginsqwt_plot_renderer.cpp:844:22: error: mingw32-make[2]: *** [Makefile.Release:8001: release/qwt_painter_command.o] Error 1 aggregate 'QPainterPath clipPath' has incomplete type and cannot be defined 844 | QPainterPath clipPath; | ^~~~~~~~ qwt_plot_renderer.cpp:851:25: warning: 'QVariant::Type QVariant::type() const' is deprecated: Use typeId() or metaType(). [-Wdeprecated-declarations] 851 | if ( fw.type() == QVariant::Int ) | ~~~~~~~^~ In file included from qwt_legend_data.h:16, from qwt_plot_item.h:15, from qwt_plot_dict.h:15, from qwt_plot.h:15: C:/Qt/6.8.2/mingw_64/include/QtCore/qvariant.h:433:10: note: declared here 433 | Type type() const | ^~~~ qwt_plot_renderer.cpp:889:35: warning: 'QVariant::Type QVariant::type() const' is deprecated: Use typeId() or metaType(). [-Wdeprecated-declarations] 889 | if ( borderRadius.type() == QVariant::Double | ~~~~~~~~~~~~~~~~~^~ C:/Qt/6.8.2/mingw_64/include/QtCore/qvariant.h:433:10: note: declared here 433 | Type type() const | ^~~~ mingw32-make[2]: *** [Makefile.Debug:14927: debug/qwt_plot_spectrogram.o] Error 1 mingw32-make[2]: *** [Makefile.Release:14927: release/qwt_plot_spectrogram.o] Error 1 mingw32-make[2]: *** [Makefile.Debug:21878: debug/qwt_wheel.o] Error 1 mingw32-make[2]: *** [Makefile.Debug:21665: debug/qwt_thermo.o] Error 1 mingw32-make[2]: *** [Makefile.Debug:6707: debug/qwt_dyngrid_layout.o] Error 1 mingw32-make[2]: *** [Makefile.Release:6707: release/qwt_dyngrid_layout.o] Error 1 mingw32-make[2]: *** [Makefile.Release:12150: release/qwt_plot_renderer.o] Error 1 mingw32-make[2]: Leaving directory 'c:/Users/cedric/Downloads/qwt-6.1.4/qwt-6.1.4/src' mingw32-make[1]: *** [Makefile:49: release-all] Error 2 mingw32-make[1]: *** Waiting for unfinished jobs.... mingw32-make[2]: *** [Makefile.Debug:12150: debug/qwt_plot_renderer.o] Error 1 mingw32-make[2]: Leaving directory 'c:/Users/cedric/Downloads/qwt-6.1.4/qwt-6.1.4/src' mingw32-make[1]: *** [Makefile:63: debug-all] Error 2 mingw32-make[1]: Leaving directory 'c:/Users/cedric/Downloads/qwt-6.1.4/qwt-6.1.4/src' mingw32-make: *** [Makefile:53: sub-src-make_first-ordered] Error 2 c:\Users\cedric\Downloads\qwt-6.1.4\qwt-6.1.4>
-
You will need at least Qwt 6.2 if you want to use it with Qt6.
-
Thank you. I see the link to latest is outdated on sourceforge, it points to 6.1.4, while the latest version is 6.3.0
https://sourceforge.net/projects/qwt/files/qwt/
I'll try again.
-
It works. Thanks again.
-