-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Qt5 support #1676
Add Qt5 support #1676
Conversation
Looks good to me. I would suggest that if ENABLE_QT5 is TRUE, Qt5 will be a hard requirement (and Qt4 will not be looked for). This should lower the chance of people wanting Qt5 build, but they end up with Qt4 build because of some configuration problems. Why internal QWTPolar has to be disabled - can we make it compile with internal QWTPolar? |
Hard requirement: Good idea. INTERNAL_QWTPOLAR: |
With qwtpolar, there is no debian/ubuntu package for qwtpolar - so having internal copy of it is quite convenient... we should just update the source if necessary. |
+1 for using internal qwtpolar. I was tired to compile always this package by hand.... |
Or create a package for these distros... |
Updated original text with QWTPolar issue on the (optional) TODO list |
Trying to configure this on OS X I get the following error:
OS X 10.10, Qt 5.3.2, qwt 6.1.1, qwtpolar 1.1.0, qscintilla 2.8. |
Thank you for reporting. Can you try again now? |
@m-kuhn That seemed to fixed the configuration. Now it dies on make:
Removal of the include allows the build to continue. I'm not sure if this needs to be excluded for Qt5, or if it can be removed in the Qt4 build also.
Homebrew installs this as
I had to manually build Qscintilla2, as the one that comes with homebrew links to Qt4 not Qt5. I'm not sure what's going on here, as I've specified the path to the library in ccmake: Now I'm stuck with a
The resulting application crashes on startup with the following:
|
On 19.11.2014 01:00, Joshua Arnott wrote:
Seems not to be required. Removed now.
|
Did you disable WITH_BINDINGS? |
@m-kuhn I think the issue is with qwt and qwtpolar still being linked to Qt4. Busy building them again now. |
The rebuild of qwt and qwtpolar has fixed things. I can now build with QGIS_MACAPP_BUNDLE = 0. I'm still having some issues with QGIS_PLUGIN_SUBDIR but I guess this is Mac specific and not related to Qt5. The drag and drop of layers from Finder into the canvas doesn't work. It raises an error like this:
|
I've had a go at adding support for PyQt5. This includes the cmake "black magic". Commit is here, but I don't think it's ready for merge. Python is working ( The approach I've taken is to remove the 4 prefix from a lot of the variables. For instance, The |
committed in 78c5195 |
@snorfalorpagus |
It hadn't occured to me that it was possible to build PyQt4 against Qt5. If that is the case, why don't the Python bindings work? You're right that dropping QXml would break too much. |
Maybe they work. One would need to check with a custom pyqt4/qt5 build. |
@snorfalorpagus FYI,QtXml will be coming back to PyQt5 |
@snorfalorpagus QXml should be back... |
Adds Qt5 support to QGIS.
To compile
Make sure you have the dependencies compiled and linked agains Qt5 also.
Most notably:
-DWITH_QWTPOLAR=FALSE
)Start with a clean build directory
You may have to adapt the paths to manually built Qt5 dependencies (as listed above)
TODO
Required
If ENABLE_QT5 is TRUE, Qt5 will be a hard requirementOptional
QHttp
. This class is no longer available in Qt5. Port this code toQNetworkAccessManager
. Currently it's disabled for Qt5 builds.