Git Product home page Git Product logo

Comments (6)

jmirabel avatar jmirabel commented on September 2, 2024

If you use a similar method as the one I present in #40 , you have to link to two libraries: PythonQt and PythonQt_QtAll.

from pythonqt.

iltommi avatar iltommi commented on September 2, 2024

Hi,
thanks for the suggestion, but unfortunately your fork doesn't work with qt5.
Any plans to support it?

from pythonqt.

jmirabel avatar jmirabel commented on September 2, 2024

I won't make it compliant with Qt5 in a near future but the changes I made are independent of Qt so you can apply the same changes to a Qt5 compatible version of PythonQt.

From the error message, I would say you lack one (at least) of the following:

  • a file similar to extensions/CMakeLists.txt of my fork in your PythonQt source directory,
  • a TARGET_LINK_LIBRARY(yourcpp PythonQt_QtAll) in the project that depends on PythonQt.

from pythonqt.

jcfr avatar jcfr commented on September 2, 2024

your fork doesn't work with qt5.

Support for Qt5 has been integrated in commontk/PythonQt. Using the fork shouldn't be needed

re: #40

Would make sense to integrate.

@iltommi or @jmirabel Would you mind rebasing the PR against the current patched-6 branch ?

Thanks
Jc

from pythonqt.

iltommi avatar iltommi commented on September 2, 2024

Hello @jcfr, and thanks for the help.
I switched to #patched-6 branch and it compiles after removing WebKitWidgets and webkit from

set(qt5libs Core Widgets Network OpenGL Sql Svg UiTools WebKitWidgets Xml XmlPatterns)
                                                        ^^^^^^^^^^^^^
set(qt4libs core gui network opengl sql svg uitools webkit xml xmlpatterns)
                                                    ^^^^^^

and comment this line:

# set(qtlib_to_wraplib_WebKitWidgets webkit)

Since they are no more shipped starting with 5.6 (or at least I don't have with the homebrew installation on mac). I'm not that confident in cmake to create a switch over something like if(${found_qt_version} VERSION_LESS [....], but It would be nice to have that fixed.

Now coming to my problem I think I have found a solution:
To use all the wrapped qt (which in the qmake version on sourceforge come in a separate library libPythonQt_QtAll.dylib)
I #include "PythonQt_QtBindings.h" and call PythonQt_init_QtBindings();

Is this correct?

With the qmake version, I used to link libPythonQt_QtAll.dylib
the included #include <PythonQt_QtAll.h> and call PythonQt_QtAll::init();

Thanks again!

p.s.
As side note I added this line (which seems missing):

install(FILES src/gui/PythonQtScriptingConsole.h DESTINATION ${PythonQt_INSTALL_INCLUDE_DIR}/gui)

Would it be possible to include it in the next commit?

from pythonqt.

jcfr avatar jcfr commented on September 2, 2024

Closing. Support for Qt5 is now up-to-date and available in patched-8 branch

from pythonqt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.