Giter Site home page Giter Site logo

Comments (7)

looooo avatar looooo commented on May 23, 2024

The problem is that soqt needs shiboken. But shiboken can be available as import Shiboken.shiboken or directly as import shiboken. The latter is the correct way to import it and pip-version has a bug there.
Please try again with my latest commit. If your shiboken is directly located somewhere in sys.path this should work now.

from pivy.

InventorMentor avatar InventorMentor commented on May 23, 2024

Many thanks for your quick advice ... to make your most recent commit f722bc0 compilable , I had to insert a missing definition
PyObject* shiboken = NULL;
into function getShiboken(). However, to this end, I couldn't figure out how to fix Shiboken's pip install location under Windows, yet, and I had no luck with running examiner_embed4.py with the most recent commit. Does this actually work for you? (this example requires the fix in the line 34 calling the inherited constructor I posted above in order to function under Python3)

P.S.: I still receive the error posted above
Wrong number or type of arguments for overloaded function 'new_SoQtExaminerViewer'.

from pivy.

InventorMentor avatar InventorMentor commented on May 23, 2024

Making shiboken directly importable to WinPython (as "import shiboken") by manually copying the contents of my pip installation python3.6.1amd64\lib\site-packages\Shiboken*.* one folder up (living now directly under site-packages) now lets me successfully import shiboken, however, examiner_embed4.py still gives me the following error message when trying to run this example:
TypeError: wrapInstance expected 2 arguments, got 0

Could you please confirm whether examiner_embed4.py fails for you using PySide under py3 linux64 as well? Many thanks in advance! Best regards and whishes!

from pivy.

InventorMentor avatar InventorMentor commented on May 23, 2024

Just one more finding: Using wheel PySide‑1.2.4‑cp36‑cp36m‑win_amd64.whl
from Chris Gohlke's repository of python wheels for Windows
http://www.lfd.uci.edu/~gohlke/pythonlibs/
I found that his PySide wheel already ships with shiboken. Therefore, it should not be necessasry to download Shiboken seperately and build it manually on Windows.

from PySide import shiboken

just works fine for me. I've already tried and adapted Pivy's interfaces/soqt.i correspondingly,
however, I still receive the TypeError reported above. Therefore, I reckon issue #19 is not related to importing shiboken.

from pivy.

InventorMentor avatar InventorMentor commented on May 23, 2024

Closing this, since FreeCAD uses its own C++ implementation of QuarterWidget.

from pivy.

looooo avatar looooo commented on May 23, 2024

are you going to use the free-cad viewer?

from pivy.

InventorMentor avatar InventorMentor commented on May 23, 2024

No, I reckon my best bet is to focus on your SoQt-PySide port for now, since it is closest to full Inventor Mentor compatibility in Python 3 as far as I can tell. Neverthless, to this end, SoQtExaminerViewer is not wrapped with Shiboken as a PySide QWidget type (but as pivy.gui.soqt.SoQtExaminerViewer) and its constructor unfortunately does not accept other QWidgets created with PySide. Therefore, though most Inventor Mentor examples run fine with SoQt now, not having SoQtExaminerViewer embedable in a PySide application makes the current SoQt port unusable from a pure Pythpn application development point of view ...

from pivy.

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.