Hi Ulrich,
i am willing to try on windows
(as long as i use it
)
i have made the changes - just to verify here my changed file:
(c:\Users\Stefan\AppData\Roaming\FreeCAD\BOLTS\gui\freecad_bolts.py)
Code: Select all
from os.path import dirname, join
bolts_path = dirname(__file__)
from BOLTS import USE_PYSIDE
import FreeCAD, FreeCADGui
FreeCAD.Console.PrintMessage(FreeCADGui.PySideUic.__doc__)
if USE_PYSIDE:
from PySide import QtCore, QtGui
# from FreeCADGui import PySideUic as uic
try:
# Ui_BoltsWidget,QBoltsWidget = uic.loadUiType(join(bolts_path,'bolts_widget.ui'))
# Ui_ValueWidget,QValueWidget = uic.loadUiType(join(bolts_path,'value_widget.ui'))
# Ui_BoolWidget,QBoolWidget = uic.loadUiType(join(bolts_path,'bool_widget.ui'))
# Ui_TableIndexWidget,QTableIndexWidget = uic.loadUiType(join(bolts_path,'tableindex_widget.ui'))
# Ui_PropertyWidget,QPropertyWidget = uic.loadUiType(join(bolts_path,'property_widget.ui'))
Ui_BoltsWidget,QBoltsWidget = FreeCADGui.PySideUic.loadUiType(join(bolts_path,'bolts_widget.ui'))
Ui_ValueWidget,QValueWidget = FreeCADGui.PySideUic.loadUiType(join(bolts_path,'value_widget.ui'))
Ui_BoolWidget,QBoolWidget = FreeCADGui.PySideUic.loadUiType(join(bolts_path,'bool_widget.ui'))
Ui_TableIndexWidget,QTableIndexWidget = FreeCADGui.PySideUic.loadUiType(join(bolts_path,'tableindex_widget.ui'))
Ui_PropertyWidget,QPropertyWidget = FreeCADGui.PySideUic.loadUiType(join(bolts_path,'property_widget.ui'))
except ImportError:
FreeCAD.Console.PrintError("\n\nuic import failed. Make sure that the pyside tools are installed\n")
raise
from PySide.QtCore import Slot
def unpack(x):
return x
else:
i have added some line breaks to your Console.PrintError so it is a clearer line
and have added the 'FreeCAD.Console.PrintMessage(FreeCADGui.PySideUic.__doc__)'
the output in the Report view if i execute the scirpt is following:
Code: Select all
PySideUic helper module
uic import failed. Make sure that the pyside tools are installed
Traceback (most recent call last):
File "C:/Users/Stefan/AppData/Roaming/FreeCAD/start_bolts.FCMacro", line 1, in <module>
import BOLTS
File "C:\Users\Stefan\AppData\Roaming\FreeCAD\BOLTS\__init__.py", line 40, in <module>
from gui.freecad_bolts import BoltsWidget
File "C:\Users\Stefan\AppData\Roaming\FreeCAD\BOLTS\gui\freecad_bolts.py", line 36, in <module>
Ui_BoltsWidget,QBoltsWidget = FreeCADGui.PySideUic.loadUiType(join(bolts_path,'bolts_widget.ui'))
File "<string>", line 1, in <module>
<type 'exceptions.ImportError'>: No module named pysideuic
after some try and error i have found a way to install PySide for my system python2.7:
Code: Select all
C:\Python27\Scripts> .\pip2.exe install PySide
after this i just could copy the directory
'c:\Python27\Lib\site-packages\pysideuic'
to 'FreeCAD_0.15.4572_x64_dev_bin\bin\Lib\site-packages\'
and now it works with the original (unmodified) BOLTS
thanks for your time!
sunny greetings
stefan