Isotropix Forums

Error When trying to import Pyside.Gui

Clarisse Scripting related topics

Error When trying to import Pyside.Gui

Unread postby mikeporetti » Fri Aug 31, 2018 5:28 am

import sys

import PySide
from PySide.QtGui import QApplication
from PySide.QtGui import QMessageBox


projectName = "Test"

app = None
if not QApplication.instance(): #QtApplication doesn't exist
app = QApplication(sys.argv)
else:
app = QApplication.instance()

# Create a simple dialog box
msgBox = QMessageBox()
msgBox.setText("Project " + projectName)
msgBox.exec_()





Tried runinng the code above and got this:


Traceback (most recent call last):
File "<string>", line 4, in <module>
ImportError: DLL load failed: %1 is not a valid Win32 application.


help pls
mikeporetti
 
Posts: 7
Joined: Thu Jan 28, 2016 9:29 pm

Re: Error When trying to import Pyside.Gui

Unread postby bvaldes » Fri Aug 31, 2018 8:05 am

Hello,

You should take a look to the SDK doc about using QT with Clarisse. It's not online so I can't give you a direct link but press F1 inside of Clarisse to open the local doc and the go to Reference in the menu, then click on Scripting/API. In the SDK doc you have a section called `Using Qt through Python in Clarisse`.

By the way did you try to run PySide in a terminal? It could be an issue from your PySide instalation.

Regards
Benoit VALDES
Isotropix
Clarisse QA
User avatar
bvaldes
 
Posts: 283
Joined: Mon Sep 26, 2016 10:44 am


Return to Scripting