Menu

#384 qwt 6.3.0 with qt6 Issue

None
closed
nobody
None
5
2025-06-30
2025-06-27
Anonymous
No

When I try to install qwt 6.3.0 when I have qt6 it can't even build as qwt 6.3.0 has a deprecated version of functions in qt6 which is replaced from qt5, is there any fix for this issue ?

Discussion

  • Uwe Rathmann

    Uwe Rathmann - 2025-06-30

    An API being marked as deprecetad in Qt6 is likely to be removed with Qt7, but is available until the end of the Qt6 series. So as long as you don't explicitely set the compiler flags to disable all deprecated functions it should be no problem.

    Disabling deprecated functions is useful if you have a specific version of Qt and you want your code being prepared for updating to a higher version. However this is not the case for Qwt - Qwt 6.3.x is supposed to work with Qt 4/5/6 versions from a single source base.

    Trying to avoid deprecated functions would result in a jungle of ifdefs, where the implementation of the deprecated method gets more or less shifted from Qt to Qwt code. It would also mean that I would have to release new versions of Qwt every time a new Qt release adds a method ( being used by Qwt ) to the deprecation section - in the worst case with incompatibilities ( source and/or binary ).

    Of course all usages of deprecated APIs, that do not cause the problems above, should be replaced. If you see some let me know.

     

    Last edit: Uwe Rathmann 2025-06-30
  • Anonymous

    Anonymous - 2025-06-30

    qwt_plot_glcanvas.h uses QGLWidget, which is removed in Qt6.

     
    • Uwe Rathmann

      Uwe Rathmann - 2025-06-30

      qwt_plot_glcanvas.h is only avaiable when being built for Qt 4/5 - see src/src.pri
      In the code of the examples it is handled by #ifdefs - using QwtPlotGLCanvas only for Qt < 5.4

      Note that the majority of the Qwt applications should be running with Qt6 nowadays.

       
      • Anonymous

        Anonymous - 2025-06-30

        oh ok, I was trying to build the qwt using cmake so I just need to do a condition if qt<5.4 include this file if not to not include in the build

         
  • Uwe Rathmann

    Uwe Rathmann - 2025-06-30
    • status: open --> closed
    • Group: -->
     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB