PySide migration

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
ulrich1a
Posts: 1922
Joined: Sun Jul 07, 2013 12:08 pm

Re: PySide migration

Postby ulrich1a » Tue Jan 07, 2014 1:31 pm

wmayer wrote:So, you have to copy the stuff to FreeCAD's bin or lib directory.
I did it and it worked now, as long as I use english as language. With german I get: 'ascii' codec can't encode character u'\xfc' in position 0: ordinal not in range(128)
and the start page is not shown.
OS: Windows 7
Platform: 32-bit
Version: 0.14.2966 (Git)
Branch: master
Hash: c19e42cb7bca5090be62bab360038d28f94e96fa
Python version: 2.6.2
Qt version: 4.5.2
Coin version: 3.1.0
SoQt version: 1.4.1
ulrich1a
Posts: 1922
Joined: Sun Jul 07, 2013 12:08 pm

Re: PySide migration

Postby ulrich1a » Tue Jan 07, 2014 8:43 pm

yorik wrote:Ok I just fixed the translation system of Arch & Draft... Those should start and work normally now.
I am getting the following message at change to the draft workbench:
must be sip.simplewrapper, not PySide.QtGui.QWidget
and
('[Draft.todo.tasks] Unexpected error:', <type 'exceptions.TypeError'>, 'in ', <built-in method showDialog of tuple object at 0x95e62ac>, '(', <DraftGui.DraftTaskPanel instance at 0x9a4e54c>, ')')<type 'exceptions.TypeError'>
<type 'exceptions.TypeError'>
<type 'exceptions.TypeError'>
<type 'exceptions.TypeError'>
<type 'exceptions.TypeError'>
<type 'exceptions.TypeError'>
at trying to draw a rectangle.

OS: Debian GNU/Linux 7.3 (wheezy)
Platform: 32-bit
Version: 0.14.2971 (Git)
Branch: master
Hash: 1f8c2e8f2c1e8ffd53326f17c8fd3332124ce861
Python version: 2.7.3
Qt version: 4.8.2
Coin version: 3.1.3
SoQt version: 1.5.0
OCC version: 6.6.0

Ulrich
User avatar
yorik
Site Admin
Posts: 11864
Joined: Tue Feb 17, 2009 9:16 pm
Location: São Paulo, Brazil
Contact:

Re: PySide migration

Postby yorik » Tue Jan 07, 2014 10:28 pm

ulrich1a wrote:I am getting the following message at change to the draft workbench:
must be sip.simplewrapper, not PySide.QtGui.QWidget
Hm this is weird, I can't reproduce that error here... To me it seems that you still have freecad compiled with pyqt (FreeCADGui.Control.showDialog expecting a sip object)
User avatar
NormandC
Posts: 18534
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: PySide migration

Postby NormandC » Wed Jan 08, 2014 5:29 am

OK, the latest Daily Build PPA on Ubuntu 12.04 includes the changes to PySide.

When loading FreeCAD, the StartPage did not load up (it is my default workbench), I only got a grey background. The report view reported "No module named PySide".

Installing the python-pyside metapackage (it installed about 22MB of packages) apparently solved the problem. It's getting late here, so I'll make the required change to the control file in the packagaing branches tomorrow.
wmayer
Site Admin
Posts: 15756
Joined: Thu Feb 19, 2009 10:32 am

Re: PySide migration

Postby wmayer » Wed Jan 08, 2014 9:15 am

yorik wrote:
ulrich1a wrote:I am getting the following message at change to the draft workbench:
must be sip.simplewrapper, not PySide.QtGui.QWidget
Hm this is weird, I can't reproduce that error here... To me it seems that you still have freecad compiled with pyqt (FreeCADGui.Control.showDialog expecting a sip object)
Have you installed the dev packages for shiboken and pyside? As a simple test you can edit WidgetFactory.cpp and add a block like this:

Code: Select all

#ifndef HAVE_SHIBOKEN
# error "Shiboken not found"
#endif
#ifndef HAVE_PYSIDE
# error "PySide not found"
#endif
Sanguinario_Joe
Posts: 49
Joined: Wed Jan 01, 2014 1:17 pm

Re: PySide migration

Postby Sanguinario_Joe » Wed Jan 08, 2014 9:29 am

Hey guys!

I already solved the the troubles with the matplotlib abstraction layer, but now I'm having a lot of problems with the dammit PySide Pitfalls:

http://qt-project.org/wiki/PySide_Pitfalls

Hopefully I will solve it soon!
Pepe
wmayer
Site Admin
Posts: 15756
Joined: Thu Feb 19, 2009 10:32 am

Re: PySide migration

Postby wmayer » Wed Jan 08, 2014 10:14 am

Here a new problem: When you use the tool bar mode for Draft then the buttons are messed up, i.e. the layout is completely broken.
jmaustpc
Posts: 9639
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: PySide migration

Postby jmaustpc » Wed Jan 08, 2014 10:59 am

wmayer wrote:Here a new problem: When you use the tool bar mode for Draft then the buttons are messed up, i.e. the layout is completely broken.
Hi Guys
I have that problem as well.

For me it was only the one tool bar. I am re-compiling I will post a screen shot when it is finished.

Also if I click on the 'working plane button on that tool bar (which is now on the left) the tool bar disappears sometimes.

Jim
jmaustpc
Posts: 9639
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: PySide migration

Postby jmaustpc » Wed Jan 08, 2014 11:36 am

Draft_toolbar.png
Draft_toolbar.png (68.97 KiB) Viewed 1949 times
User avatar
yorik
Site Admin
Posts: 11864
Joined: Tue Feb 17, 2009 9:16 pm
Location: São Paulo, Brazil
Contact:

Re: PySide migration

Postby yorik » Wed Jan 08, 2014 12:54 pm

What? You guys didn't like my new super-condensed Draft mode??? :D
Hehe strange pyside-effect... I'll fix that ASAP