I was wondering if anyone has encountered this problem when trying to
use pyQT, I think i may be have a path left out from my environment
variables or haven't clicked something to set everything up, but i keep
getting the error below
Traceback (most recent call last):
File
"C:\Users\simon.anderson\workspace\Testing\src\dombookmarks.pyw", line
45, in <module>
from PyQt4 import QtCore, QtGui, QtXml
ImportError: DLL load failed: The specified procedure could not be found.
I have Python 2.6 64bit version installed and installed the 64bit
executable of PyQt, and I cant seem to create a QT windows from the xsi
script interface, I can create a Qt window from the pywin interface.
Any help would be greatly appreciated
Thanks
Si
>From an earlier post on the list
From: softimag...@listproc.autodesk.com [mailto:softimag...@listproc.autodesk.com] On Behalf Of Stephen Blair
Sent: January-06-11 1:59 PM
To: soft...@listproc.autodesk.com
Subject: RE: conflict with QT DLLs inside Softimage 2011.5
We don't use the Qt DLLs.
I believe the idea was to ship the Qt dlls for plugins that use Qt, so that the dlls were already in place.
From: softimag...@listproc.autodesk.com [mailto:softimag...@listproc.autodesk.com] On Behalf Of Xavier Lapointe
Sent: January-06-11 1:52 PM
To: soft...@listproc.autodesk.com
Subject: conflict with QT DLLs inside Softimage 2011.5
Hi guys,
I had a strange problem today using PyQt4 (latest x86_64 version) and softimage 2011.
Here's the traceback:
# INFO : Traceback (most recent call last):
# File "C:\dev\sourceAssets\src\__init__.py", line 5, in <module>
# from PyQt4 import QtGui
# ImportError: DLL load failed: The specified procedure could not be found.
Finally found that the problem comes from the Qt DLLs inside the softimage installation bin directory
(C:\Program Files\Autodesk\Softimage 2011 Subscription Advantage Pack\Application\bin)
I fixed it by renaming the Qt DLLs with a .bak extension ... but I was wondering if this could cause any problem to Softimage, and if anyone of you had this problem and managed to solve it (let say without renaming the DLLs)?
WOO!! I do the Stephen Blair dance of awesome! haha.. taken me the whole
day trying to figure out why this wasn't working.
I tried this too and trying to create a Qt window from inside Softimage crashes Qt instantly.
The one thing I've read here on the list some months ago is that you need to remove the QT dll's
that ship with Softimage before attempting anything. Didn't help in my case though, I'm still stuck.
Copy/paste from previous thread:
even get instant
--
-------------------------------------------
Stefan Kubicek Co-founder
-------------------------------------------
keyvis digital imagery
1050 Vienna Wehrgasse 9 Austria
Phone: +43/699/12614231
--- www.keyvis.at ste...@keyvis.at ---
-- This email and its attachments are
--confidential and for the recipient only--
What I managed to do so far is install pyQT for Python 2.6 x64 (which seems to be the Python version installed with Softimage 2011)
inside the site-packages folder of Softimage's own Python folder.
I can now import modules (yes, I renamed the default Qt dll's installed in Softimage's Application/bin folder to avoid any conflicts),
from PyQt4.QtGui import *
from PyQt4.QtCore import *
...but Softimage will fast-exit when I try to open a window (not to mention that it's not parented to the main window):
class MainWindow(QMainWindow):
def __init__(self, parent=None):
super(MainWindow, self).__init__(parent)
self.filename = None
self.dirty = False
self.listWidget = QListWidget()
self.setCentralWidget(self.listWidget)
self.setWindowTitle("ListKeeper - Unnamed List")
MainWindow()
This will bomb Softimage instantly.
got it working finally, after just about ripping my hair out and turning
my OS path system into swiss cheese
Humbly yours,
Stefan
hope that helps
import PyQt4
import sys
from PyQt4 import QtGui
class HelloWindow(QtGui.QMainWindow):
def __init__(self, win_parent = None):
# Init the base class
QtGui.QMainWindow.__init__(self, win_parent)
self.create_widgets()
def create_widgets(self):
# Widgets
self.label = QtGui.QLabel("Say Hello:")
self.hello_edit = QtGui.QLineEdit()
self.hello_button = QtGui.QPushButton("Push Me!")
# Horizontal layout
h_box = QtGui.QHBoxLayout()
h_box.addWidget(self.label)
h_box.addWidget(self.hello_edit)
h_box.addWidget(self.hello_button)
# Create central widget, add layout, and set
central_widget = QtGui.QWidget()
central_widget.setLayout(h_box)
self.setCentralWidget(central_widget)
#if __name__ == "__main__":
# Someone is launching this directly
# Create the QApplication
app = QtGui.QApplication(sys.argv)
# The Main window
main_window = HelloWindow()
main_window.show()
# Enter the main loop
app.exec_()
@Dominic: Right, I was just looking into this. "win_parent" in QtGui.QMainWindow.__init__(self, win_parent)
caught my eye, but I guess it expects another Qt widget instead of an hwnd handle? I've used pywin32 for QMenu
in a similar way, lets see where it gets me in this case. Thanks for the heads up.
Stefan
Stefan