Re: [QGIS-Developer] How to handle upstream Qt fixes
Hi Nyall, On Fri, 03. Sep 2021 at 08:46:21 +1000, Nyall Dawson wrote: > - KDE and other open source projects forked Qt 5.15 at > https://invent.kde.org/qt/qt/qtbase/-/commits/dev/, and are actively > backporting fixes from Qt6 to that branch. Fedora recently started > using the KDE branch for Qt 5 library builds, so users of that > platform once again are getting bug fixes deployed [1]. I'm unaware if > other distributions or builds of Qt are using this currently. > - Similarly, there's a KDE fork of Qt 3d at > https://invent.kde.org/qt/qt/qt3d/-/commits/kde/5.15/ I asked on #debian-qt-kde on OFTC and they are apparently not planning to apply the patch collection blindly, but probably would apply individual patches (of the currently 222 qtbase and 33 in qt3d patches) that we need. > Right now, there's a number of very frustrating issues that Qt 5.15.2 > has which impact our users. An example is #44876, which results in > very large PDF exports from QGIS with broken hairline line rendering > [2]. Do you know whether the PDF issue is already addressed in the patch collection? > - Are we free to change the Windows builds to use the KDE backports > fork of 5.15 instead of the official 5.15.2 releases? (Or does that > change lots of osgeo4w packaging things?). Similarly, are we free to > move the MacOS builds to the KDE branch too? > - Could we also move the Windows/MacOS builds of Qt 3d to use the KDE fork? I suppose so - I would probably just apply them all in OSGeo4W and hope for the best ;) > - Does anyone know if Debian have plans to migrate to the KDE > backports fork? (Last I heard, the debian Qt maintainers stepped down > and the package is currently lacking a maintainer!) see above. > - If we can get the majority of our users onto builds which use the > KDE backports branch (i.e. Windows/mac users) Do we know that there are significantly more users on Mac than on free platforms? > , could we re-start the relationship with KDAB and contract them for bug > fixes again for 3.22? (with the arrangement explicitly requiring them to > backport fixes to Qt 5 via KDE's fork). I'd say yes. Jürgen -- Jürgen E. Fischer norBIT GmbH Tel. +49-4931-918175-31 Dipl.-Inf. (FH) Rheinstraße 13 Fax. +49-4931-918175-50 Software Engineer D-26506 Nordenhttps://www.norbit.de QGIS release manager (PSC) Germany IRC: jef on Libera|OFTC signature.asc Description: PGP signature norBIT Gesellschaft fuer Unternehmensberatung und Informationssysteme mbH Rheinstrasse 13, 26506 Norden GF: Juergen Fischer, Nils Kutscher HR: Amtsgericht Aurich HRB 100827 Datenschutzerklaerung: https://www.norbit.de/83/ ___ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [QGIS-Developer] Trouble compiling QGIS
Hi Even, With "valgrind output/bin/crssync" I can see that two different "libproj"-versions are involved with crssync: /usr/lib/x86_64-linux-gnu/libproj.so.15.3.1 and /usr/local/lib/libproj.so.22.1.0 I guess I will have to find out which library is still referencing the old libproj version - perhaps that libspatialite culprit again ... Thanks for your hints, Andreas On 2021-09-03 15:42, Even Rouault wrote: Andreas Several things to check: - Is your GDAL build a clean one ? That is is it from a fresh build directory, or are you rebuilding in a directory where a previous build was done. If the later, make sure to "make clean" before rebuilding - Is your GDAL build using your custom GEOS one ? Otherwise QGIS might link directly to the custom one and indirectly to the system one through GDAL. Check the output of "ldd output/bin/qgis | grep geos" - try "valgrind output/bin/crssync". Emitted stack traces can give interesting hints Even Le 03/09/2021 à 15:30, Andreas Neumann a écrit : Hi, I have troubles compiling QGIS on my Linux Ubuntu 20.04 machine. I use a self-compiled GEOS and GDAL. The build always hangs at "crssync" - here is the ninja build output I get. Do you have any idea what might be wrong or what I could do in order to fix this problem? Thank you for your hints, Andreas [0/1] Re-running CMake... -- QGIS version: 3.21.0 Master (32100) -- Found OpenCL C++ headers: /usr/include -- ccache found -- Found Proj: /usr/local/lib/libproj.so version 8 (8.1.0) -- Found GEOS: /usr/local/lib/libgeos_c.so (3.9.1) -- Found GDAL: /usr/local/lib/libgdal.so (3.3.1) -- Found Expat: /usr/lib/x86_64-linux-gnu/libexpat.so -- Found Spatialindex: /usr/lib/x86_64-linux-gnu/libspatialindex.so -- Found Qwt: /usr/lib/libqwt-qt5.so (6.1.4) -- Found libzip: /usr/lib/x86_64-linux-gnu/libzip.so -- Found Sqlite3: /usr/lib/x86_64-linux-gnu/libsqlite3.so -- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so;-pthread -- Found zlib: /usr/lib/x86_64-linux-gnu/libz.so -- Found exiv2: /usr/lib/x86_64-linux-gnu/libexiv2.so -- Found PostgreSQL: /usr/local/pgsql/lib/libpq.so -- Found SpatiaLite: /usr/local/lib/libspatialite.so -- Qt WebKit support enabled -- Found ZSTD: /usr/lib/x86_64-linux-gnu/libzstd.so -- Found laz-perf: /usr/local/include -- Found PDAL: /usr/local/lib/libpdalcpp.so;/usr/local/lib/libpdal_util.so (2.0.1) -- Found Qt version: 5.12.8 -- Found QScintilla2: /usr/lib/libqscintilla2_qt5.so (2.11.2) -- Found QtKeychain: /usr/lib/x86_64-linux-gnu/libqt5keychain.so -- Found QCA: /usr/lib/x86_64-linux-gnu/libqca-qt5.so (2.2.1) -- Found QCA OpenSSL plugin -- Pedantic compiler settings enabled -- Found GSL: -L/usr/lib/x86_64-linux-gnu -lgsl -lgslcblas -lm -- Found Python executable: /usr/bin/python3.8 (version 3.8.10) -- Python library: /usr/lib/x86_64-linux-gnu/libpython3.8.so -- Python site-packages: /usr/lib/python3/dist-packages -- Found PyQt5 version: 5.14.1 -- Found SIP version: 4.19.21 -- Found QScintilla2 PyQt module: 2.11.2 -- Could NOT find HDF5 (missing: HDF5_LIBRARIES HDF5_INCLUDE_DIRS) (found version "") -- Could NOT find NetCDF (missing: NETCDF_LIBRARY NETCDF_INCLUDE_DIR) -- Using PROJ >= 6 srs database. -- Ctest Binary Directory set to: /home/bjsvwneu/dev/QGIS/build/output/bin -- Configuring done -- Generating done -- Build files have been written to: /home/bjsvwneu/dev/QGIS/build [1/6072] Generating qgsversion.h, qgsversion.inc Files "/home/bjsvwneu/dev/QGIS/build/qgsversion.h.temp" to "/home/bjsvwneu/dev/QGIS/build/qgsversion.h" are different. [3/6072] Generating qgsexpression_texts.cpp Files "/home/bjsvwneu/dev/QGIS/build/src/core/qgsexpression_texts.cpp.temp" to "/home/bjsvwneu/dev/QGIS/build/src/core/qgsexpression_texts.cpp" are different. [2905/6072] Generating gui/sip_guipart0.cpp, gui/sip_guipart1.cpp, gui/sip_guipart2.cpp, gui/sip_guipart3.cpp, gui/sip_guipart4.cpp, g...i/sip_guipart10.cpp, gui/sip_guipart11.cpp, gui/sip_guipart12.cpp, gui/sip_guipart13.cpp, gui/sip_guipart14.cpp, gui/sip_guipart15.cpp [4061/6072] Building CXX object src/providers/mdal/CMakeFiles/provider_mdal.dir/__/__/__/external/mdal/mdal_utils.cpp.o ../external/mdal/mdal_utils.cpp: In function 'int MDAL::toInt(size_t)': ../external/mdal/mdal_utils.cpp:143:14: warning: comparison of integer expressions of different signedness: 'const size_t' {aka 'const long unsigned int'} and 'int' [-Wsign-compare] 143 | if ( value > std::numeric_limits::max() ) |~~^ [4172/6072] Running crssync FAILED: src/crssync/CMakeFiles/synccrsdb cd /home/bjsvwneu/dev/QGIS/build/src/crssync && /home/bjsvwneu/dev/QGIS/build/output/bin/crssync free(): invalid pointer Aborted (core dumped) [4173/6072] Building CXX object src/plugins/topology/CMakeFiles/topolplugin.dir/topolplugin_autogen/mocs_compilation.cpp.o ninja: build stopped: subcommand failed. ___ QGIS-Developer mailing list QGI
Re: [QGIS-Developer] Trouble compiling QGIS
Andreas Several things to check: - Is your GDAL build a clean one ? That is is it from a fresh build directory, or are you rebuilding in a directory where a previous build was done. If the later, make sure to "make clean" before rebuilding - Is your GDAL build using your custom GEOS one ? Otherwise QGIS might link directly to the custom one and indirectly to the system one through GDAL. Check the output of "ldd output/bin/qgis | grep geos" - try "valgrind output/bin/crssync". Emitted stack traces can give interesting hints Even Le 03/09/2021 à 15:30, Andreas Neumann a écrit : Hi, I have troubles compiling QGIS on my Linux Ubuntu 20.04 machine. I use a self-compiled GEOS and GDAL. The build always hangs at "crssync" - here is the ninja build output I get. Do you have any idea what might be wrong or what I could do in order to fix this problem? Thank you for your hints, Andreas [0/1] Re-running CMake... -- QGIS version: 3.21.0 Master (32100) -- Found OpenCL C++ headers: /usr/include -- ccache found -- Found Proj: /usr/local/lib/libproj.so version 8 (8.1.0) -- Found GEOS: /usr/local/lib/libgeos_c.so (3.9.1) -- Found GDAL: /usr/local/lib/libgdal.so (3.3.1) -- Found Expat: /usr/lib/x86_64-linux-gnu/libexpat.so -- Found Spatialindex: /usr/lib/x86_64-linux-gnu/libspatialindex.so -- Found Qwt: /usr/lib/libqwt-qt5.so (6.1.4) -- Found libzip: /usr/lib/x86_64-linux-gnu/libzip.so -- Found Sqlite3: /usr/lib/x86_64-linux-gnu/libsqlite3.so -- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so;-pthread -- Found zlib: /usr/lib/x86_64-linux-gnu/libz.so -- Found exiv2: /usr/lib/x86_64-linux-gnu/libexiv2.so -- Found PostgreSQL: /usr/local/pgsql/lib/libpq.so -- Found SpatiaLite: /usr/local/lib/libspatialite.so -- Qt WebKit support enabled -- Found ZSTD: /usr/lib/x86_64-linux-gnu/libzstd.so -- Found laz-perf: /usr/local/include -- Found PDAL: /usr/local/lib/libpdalcpp.so;/usr/local/lib/libpdal_util.so (2.0.1) -- Found Qt version: 5.12.8 -- Found QScintilla2: /usr/lib/libqscintilla2_qt5.so (2.11.2) -- Found QtKeychain: /usr/lib/x86_64-linux-gnu/libqt5keychain.so -- Found QCA: /usr/lib/x86_64-linux-gnu/libqca-qt5.so (2.2.1) -- Found QCA OpenSSL plugin -- Pedantic compiler settings enabled -- Found GSL: -L/usr/lib/x86_64-linux-gnu -lgsl -lgslcblas -lm -- Found Python executable: /usr/bin/python3.8 (version 3.8.10) -- Python library: /usr/lib/x86_64-linux-gnu/libpython3.8.so -- Python site-packages: /usr/lib/python3/dist-packages -- Found PyQt5 version: 5.14.1 -- Found SIP version: 4.19.21 -- Found QScintilla2 PyQt module: 2.11.2 -- Could NOT find HDF5 (missing: HDF5_LIBRARIES HDF5_INCLUDE_DIRS) (found version "") -- Could NOT find NetCDF (missing: NETCDF_LIBRARY NETCDF_INCLUDE_DIR) -- Using PROJ >= 6 srs database. -- Ctest Binary Directory set to: /home/bjsvwneu/dev/QGIS/build/output/bin -- Configuring done -- Generating done -- Build files have been written to: /home/bjsvwneu/dev/QGIS/build [1/6072] Generating qgsversion.h, qgsversion.inc Files "/home/bjsvwneu/dev/QGIS/build/qgsversion.h.temp" to "/home/bjsvwneu/dev/QGIS/build/qgsversion.h" are different. [3/6072] Generating qgsexpression_texts.cpp Files "/home/bjsvwneu/dev/QGIS/build/src/core/qgsexpression_texts.cpp.temp" to "/home/bjsvwneu/dev/QGIS/build/src/core/qgsexpression_texts.cpp" are different. [2905/6072] Generating gui/sip_guipart0.cpp, gui/sip_guipart1.cpp, gui/sip_guipart2.cpp, gui/sip_guipart3.cpp, gui/sip_guipart4.cpp, g...i/sip_guipart10.cpp, gui/sip_guipart11.cpp, gui/sip_guipart12.cpp, gui/sip_guipart13.cpp, gui/sip_guipart14.cpp, gui/sip_guipart15.cpp [4061/6072] Building CXX object src/providers/mdal/CMakeFiles/provider_mdal.dir/__/__/__/external/mdal/mdal_utils.cpp.o ../external/mdal/mdal_utils.cpp: In function ‘int MDAL::toInt(size_t)’: ../external/mdal/mdal_utils.cpp:143:14: warning: comparison of integer expressions of different signedness: ‘const size_t’ {aka ‘const long unsigned int’} and ‘int’ [-Wsign-compare] 143 | if ( value > std::numeric_limits::max() ) | ~~^ [4172/6072] Running crssync FAILED: src/crssync/CMakeFiles/synccrsdb cd /home/bjsvwneu/dev/QGIS/build/src/crssync && /home/bjsvwneu/dev/QGIS/build/output/bin/crssync free(): invalid pointer Aborted (core dumped) [4173/6072] Building CXX object src/plugins/topology/CMakeFiles/topolplugin.dir/topolplugin_autogen/mocs_compilation.cpp.o ninja: build stopped: subcommand failed. ___ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer -- http://www.spatialys.com My software is free, but my time generally not. ___ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-develo
[QGIS-Developer] Trouble compiling QGIS
Hi, I have troubles compiling QGIS on my Linux Ubuntu 20.04 machine. I use a self-compiled GEOS and GDAL. The build always hangs at "crssync" - here is the ninja build output I get. Do you have any idea what might be wrong or what I could do in order to fix this problem? Thank you for your hints, Andreas [0/1] Re-running CMake... -- QGIS version: 3.21.0 Master (32100) -- Found OpenCL C++ headers: /usr/include -- ccache found -- Found Proj: /usr/local/lib/libproj.so version 8 (8.1.0) -- Found GEOS: /usr/local/lib/libgeos_c.so (3.9.1) -- Found GDAL: /usr/local/lib/libgdal.so (3.3.1) -- Found Expat: /usr/lib/x86_64-linux-gnu/libexpat.so -- Found Spatialindex: /usr/lib/x86_64-linux-gnu/libspatialindex.so -- Found Qwt: /usr/lib/libqwt-qt5.so (6.1.4) -- Found libzip: /usr/lib/x86_64-linux-gnu/libzip.so -- Found Sqlite3: /usr/lib/x86_64-linux-gnu/libsqlite3.so -- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so;-pthread -- Found zlib: /usr/lib/x86_64-linux-gnu/libz.so -- Found exiv2: /usr/lib/x86_64-linux-gnu/libexiv2.so -- Found PostgreSQL: /usr/local/pgsql/lib/libpq.so -- Found SpatiaLite: /usr/local/lib/libspatialite.so -- Qt WebKit support enabled -- Found ZSTD: /usr/lib/x86_64-linux-gnu/libzstd.so -- Found laz-perf: /usr/local/include -- Found PDAL: /usr/local/lib/libpdalcpp.so;/usr/local/lib/libpdal_util.so (2.0.1) -- Found Qt version: 5.12.8 -- Found QScintilla2: /usr/lib/libqscintilla2_qt5.so (2.11.2) -- Found QtKeychain: /usr/lib/x86_64-linux-gnu/libqt5keychain.so -- Found QCA: /usr/lib/x86_64-linux-gnu/libqca-qt5.so (2.2.1) -- Found QCA OpenSSL plugin -- Pedantic compiler settings enabled -- Found GSL: -L/usr/lib/x86_64-linux-gnu -lgsl -lgslcblas -lm -- Found Python executable: /usr/bin/python3.8 (version 3.8.10) -- Python library: /usr/lib/x86_64-linux-gnu/libpython3.8.so -- Python site-packages: /usr/lib/python3/dist-packages -- Found PyQt5 version: 5.14.1 -- Found SIP version: 4.19.21 -- Found QScintilla2 PyQt module: 2.11.2 -- Could NOT find HDF5 (missing: HDF5_LIBRARIES HDF5_INCLUDE_DIRS) (found version "") -- Could NOT find NetCDF (missing: NETCDF_LIBRARY NETCDF_INCLUDE_DIR) -- Using PROJ >= 6 srs database. -- Ctest Binary Directory set to: /home/bjsvwneu/dev/QGIS/build/output/bin -- Configuring done -- Generating done -- Build files have been written to: /home/bjsvwneu/dev/QGIS/build [1/6072] Generating qgsversion.h, qgsversion.inc Files "/home/bjsvwneu/dev/QGIS/build/qgsversion.h.temp" to "/home/bjsvwneu/dev/QGIS/build/qgsversion.h" are different. [3/6072] Generating qgsexpression_texts.cpp Files "/home/bjsvwneu/dev/QGIS/build/src/core/qgsexpression_texts.cpp.temp" to "/home/bjsvwneu/dev/QGIS/build/src/core/qgsexpression_texts.cpp" are different. [2905/6072] Generating gui/sip_guipart0.cpp, gui/sip_guipart1.cpp, gui/sip_guipart2.cpp, gui/sip_guipart3.cpp, gui/sip_guipart4.cpp, g...i/sip_guipart10.cpp, gui/sip_guipart11.cpp, gui/sip_guipart12.cpp, gui/sip_guipart13.cpp, gui/sip_guipart14.cpp, gui/sip_guipart15.cpp [4061/6072] Building CXX object src/providers/mdal/CMakeFiles/provider_mdal.dir/__/__/__/external/mdal/mdal_utils.cpp.o ../external/mdal/mdal_utils.cpp: In function 'int MDAL::toInt(size_t)': ../external/mdal/mdal_utils.cpp:143:14: warning: comparison of integer expressions of different signedness: 'const size_t' {aka 'const long unsigned int'} and 'int' [-Wsign-compare] 143 | if ( value > std::numeric_limits::max() ) |~~^ [4172/6072] Running crssync FAILED: src/crssync/CMakeFiles/synccrsdb cd /home/bjsvwneu/dev/QGIS/build/src/crssync && /home/bjsvwneu/dev/QGIS/build/output/bin/crssync free(): invalid pointer Aborted (core dumped) [4173/6072] Building CXX object src/plugins/topology/CMakeFiles/topolplugin.dir/topolplugin_autogen/mocs_compilation.cpp.o ninja: build stopped: subcommand failed.___ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [QGIS-Developer] Disabling map context menu via PyQGIS
Thank you guys so much for your great suggestions! Since I am not already overriding QgsMapCanvas or using a custom MapTool at all times, I went for Benoit's solution (which Benjamin hinted at) and it works great. A hundred internet points to you! :) Cheers, Hannes Am 03.09.21 um 09:58 schrieb Benoit Ducarouge: Hi, if you just want to hide the menu, you can clear it on the contextMenuAboutToShow event : def clearMenu(menu, event): menu.clear() iface.mapCanvas().contextMenuAboutToShow.connect(clearMenu) Benoit. Le 03/09/2021 à 09:31, Benjamin Jakimow a écrit : Hi Hannes, in C++ you could override void QgsMapCanvas::showContextMenu( QgsMapMouseEvent *event ) which creates and shows the context menu. in Python showContextMenu is not available. There you could re-implement void QgsMapCanvas::mousePressEvent( QMouseEvent *e ) to avoid any calls of showContextMenu() If you just like to modify the context menu, you might add a slot for the void contextMenuAboutToShow( QMenu *menu, QgsMapMouseEvent *event ) signal that manipulates the menu. Greetings, Benjamin So you might either override it or to disable the context menu you can override QgsMapCanvas::mousePressEvent ___ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [QGIS-Developer] How to handle upstream Qt fixes
Hi all, Thank you Nyall for raising these questions - and Greg for joining the discussion. Obviously, the questions are not easy and straight-foward to answer. They also depend on what the other OS projects will do about this situation in general. Perhaps we can also ask the KDAB folks what they think about this situation and if they would recommend to continuously work on extending the life span of qt5x. I can mainly comment on the financial aspects: if, after thorough discussion, we think that staying longer with qt5 is the way the project should follow, we can of course continue to invest a bit upstream to fix issues through KDAB. However, the risk is now higher with potential forks and disconnects from the official qt. About the other questions around OSGEO4W I hope that Jürgen can give a useful reply - him being probably the "most technical" person on the QGIS PSC - and also the OSGEO4W main packager. Thanks and greetings, Andreas On 2021-09-03 01:27, Greg Troxel wrote: Nyall Dawson writes: - Qt Co effectively ended open source support of Qt 5 at the 5.15.2 release, and have moved all focus to Qt 6. - While some preliminary work has been done, QGIS doesn't currently support Qt 6 based builds, and likely won't be ready for this for some time (even completely ignoring all the stable API questions a Qt 6 build raises entirely!) - QGIS often depends on fixes and enhancements which need to be made upstream in Qt, and can't be resolved or worked-around in QGIS alone - KDE and other open source projects forked Qt 5.15 at https://invent.kde.org/qt/qt/qtbase/-/commits/dev/, and are actively backporting fixes from Qt6 to that branch. Fedora recently started using the KDE branch for Qt 5 library builds, so users of that platform once again are getting bug fixes deployed [1]. I'm unaware if other distributions or builds of Qt are using this currently. - Similarly, there's a KDE fork of Qt 3d at https://invent.kde.org/qt/qt/qt3d/-/commits/kde/5.15/ I'm speaking as the maintainer of the qgis package in pkgsrc, a multi-OS multi-CPU packaging system. Currently this is 3.16.x, and it is built against 5.15.2 (only). I think you have posed semi-separable questions and it's good to semi-separate them: - 1. should qgis target the KDE fork of QT, or 5.15.2, or both, as the library that is expected to be used, and tested in CI? - 2. when qgis.org produces binary builds, should qt-kde or qt be used? - 3. should qgis.org attempt to engage with KDAB to work on a fork of a branch discontinued by the original maintainers? - 4. Given what I see as concerning behavior by Qt Co in placing Free Software users in a bad spot, what should be the future approach to Qt? Perhaps, it should be KDE Qt 5.15, and not Qt 6.) and I think this is informed in large part by understanding the degree to which the various packaging systems (a term that I use to include GNU/Linux distributions) switch the KDE fork. In my view where Debian lands, if at all, is very influential. I will inquire within pkgsrc about the KDE fork and intent to have our Qt 5 packages track them. I am guessing that it's meant to be just a continuation of maintenance, for now, and thus quite compatible. I think that (1) is the current primary question. Choice (2) mostly flows from the answer to (1), in that it's reasonable to target 5.15.2(release) but also test with 5.15.2.kde.x, and use .kde for binaries on the theory that it has bugfixes. It's also reasonable -- if enough packaging systems move or provide the KDE fork -- to just say that testing is only against that -- but qgis seems to support older Qt anyway, and it would seem radical to demand a particular rev of 5.15 at this point. If (1) is decided in favor of the fork, then (3) seems reasonable. (4) is a hard discussion that I think should be deferred a bit until we see how the Free Software world's approach to Qt settles out. It reamains to be seen how that's going to go between extremes of being content about the withdrawal of support and just moving to 6, and deciding that qt's model wasn't such a good idea after all and that it's best to use a truly Free fork or start to get away from it entirely. Pretty obviously neither extreme is likely, but I have little confidence in guesses about where we'll land. Greg ___ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer___ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [QGIS-Developer] Disabling map context menu via PyQGIS
Hi, if you just want to hide the menu, you can clear it on the contextMenuAboutToShow event : def clearMenu(menu, event): menu.clear() iface.mapCanvas().contextMenuAboutToShow.connect(clearMenu) Benoit. Le 03/09/2021 à 09:31, Benjamin Jakimow a écrit : Hi Hannes, in C++ you could override void QgsMapCanvas::showContextMenu( QgsMapMouseEvent *event ) which creates and shows the context menu. in Python showContextMenu is not available. There you could re-implement void QgsMapCanvas::mousePressEvent( QMouseEvent *e ) to avoid any calls of showContextMenu() If you just like to modify the context menu, you might add a slot for the void contextMenuAboutToShow( QMenu *menu, QgsMapMouseEvent *event ) signal that manipulates the menu. Greetings, Benjamin So you might either override it or to disable the context menu you can override QgsMapCanvas::mousePressEvent Am 03/09/2021 um 09:14 schrieb Johannes Kröger (WhereGroup): Hi list! In QGIS 3.16 a right-click context menu was added to the map canvas: https://www.qgis.org/en/site/forusers/visualchangelog316/index.html#add-context-menu-to-map-canvas How can we disable that via PyQGIS? https://qgis.org/pyqgis/master/gui/QgsMapCanvas.html lists a "contextMenuEvent" method but does not provide any documentation at all. The environment is a QGIS based standalone application. Cheers, Hannes ___ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info:https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe:https://lists.osgeo.org/mailman/listinfo/qgis-developer -- Benjamin Jakimow, Doctoral Researcher Earth Observation Lab | Geography Department | Humboldt-Universität zu Berlin e-mail:benjamin.jaki...@geo.hu-berlin.de phone: +49 (0) 30 2093 6846 mobile: +49 (0) 157 5656 8477 fax:+49 (0) 30 2093 6848 mail: Unter den Linden 6 | 10099 Berlin | Germany room: 2'211 web:https://hu-berlin.de/eo-lab ___ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer ___ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [QGIS-Developer] Disabling map context menu via PyQGIS
Hi Hannes, in C++ you could override void QgsMapCanvas::showContextMenu( QgsMapMouseEvent *event ) which creates and shows the context menu. in Python showContextMenu is not available. There you could re-implement void QgsMapCanvas::mousePressEvent( QMouseEvent *e ) to avoid any calls of showContextMenu() If you just like to modify the context menu, you might add a slot for the void contextMenuAboutToShow( QMenu *menu, QgsMapMouseEvent *event ) signal that manipulates the menu. Greetings, Benjamin So you might either override it or to disable the context menu you can override QgsMapCanvas::mousePressEvent Am 03/09/2021 um 09:14 schrieb Johannes Kröger (WhereGroup): Hi list! In QGIS 3.16 a right-click context menu was added to the map canvas: https://www.qgis.org/en/site/forusers/visualchangelog316/index.html#add-context-menu-to-map-canvas How can we disable that via PyQGIS? https://qgis.org/pyqgis/master/gui/QgsMapCanvas.html lists a "contextMenuEvent" method but does not provide any documentation at all. The environment is a QGIS based standalone application. Cheers, Hannes ___ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer -- Benjamin Jakimow, Doctoral Researcher Earth Observation Lab | Geography Department | Humboldt-Universität zu Berlin e-mail: benjamin.jaki...@geo.hu-berlin.de phone: +49 (0) 30 2093 6846 mobile: +49 (0) 157 5656 8477 fax:+49 (0) 30 2093 6848 mail: Unter den Linden 6 | 10099 Berlin | Germany room: 2'211 web:https://hu-berlin.de/eo-lab smime.p7s Description: S/MIME Cryptographic Signature ___ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [QGIS-Developer] Disabling map context menu via PyQGIS
On Fri, 3 Sept 2021 at 17:14, Johannes Kröger (WhereGroup) wrote: > > Hi list! > > In QGIS 3.16 a right-click context menu was added to the map canvas: > https://www.qgis.org/en/site/forusers/visualchangelog316/index.html#add-context-menu-to-map-canvas > > How can we disable that via PyQGIS? > > https://qgis.org/pyqgis/master/gui/QgsMapCanvas.html lists a > "contextMenuEvent" method but does not provide any documentation at all. > > The environment is a QGIS based standalone application. Make sure your map tool doesn't return the QgsMapTool::ShowContextMenu flag. (Or subclass the inbuilt tool you are using and override its flags() implementation) Nyall > > Cheers, Hannes > > ___ > QGIS-Developer mailing list > QGIS-Developer@lists.osgeo.org > List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer > Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer ___ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
[QGIS-Developer] Disabling map context menu via PyQGIS
Hi list! In QGIS 3.16 a right-click context menu was added to the map canvas: https://www.qgis.org/en/site/forusers/visualchangelog316/index.html#add-context-menu-to-map-canvas How can we disable that via PyQGIS? https://qgis.org/pyqgis/master/gui/QgsMapCanvas.html lists a "contextMenuEvent" method but does not provide any documentation at all. The environment is a QGIS based standalone application. Cheers, Hannes OpenPGP_0xBF7B268A77C202D5.asc Description: OpenPGP public key OpenPGP_signature Description: OpenPGP digital signature ___ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer