cyrillef / Maya-PyQt-Scripts

Scripts to easily build PyQt for Maya
MIT License
42 stars 28 forks source link

What is "--no-designer-plugin" for when executing configure.py for PyQt4 compiling ? #1

Closed oglops closed 8 years ago

oglops commented 9 years ago

Hi cyrillef, I noticed that both on your blog and in the build script, there is always this argument

"%MAYA_LOCATION%\bin\mayapy" configure.py -p %QMAKESPEC% LIBDIR_QT="%QTDIR%\lib" INCDIR_QT="%QTDIR%\include\Qt" MOC="%QTDIR%\bin\moc.exe" -w --no-designer-plugin

if I remove it, I'll get the following error message when I do nmake install:

        "C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\BIN\amd64\nmake.exe" -f Makefile.Debug install

Microsoft (R) Program Maintenance Utility Version 11.00.50727.1
Copyright (C) Microsoft Corporation.  All rights reserved.

        link /LIBPATH:"x:\lib" /NOLOGO /DYNAMICBASE /NXCOMPAT /DEBUG /DLL /OUT:debug\pyqt4.dll @C:\Users\oglop\AppData\Local\Temp\nm5BE2.tmp
LINK : fatal error LNK1104: cannot open file 'QtScriptd.lib'
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\BIN\amd64\link.EXE"' : return code '0x450'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\BIN\amd64\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\BIN\amd64\nmake.exe"' : return code '0x2'
Stop.

So what is pyqt4 designer plugin ( PyQt4.dll ) for ? Why don't I need it ? Thanks!

edit: I found some explanation here , but I'm not quite sure what It meant by

PyQt4 installs a C++ plugin in Designer’s plugin directory. It conforms to the interface defined by the QDesignerCustomWidgetCollectionInterface class. It searches a configurable set of directories > looking for Python plugins that implement a class sub-classed from QPyDesignerCustomWidgetPlugin. Each class that is found is instantiated and the instance created is added to the custom widget collection.

cyrillef commented 9 years ago

Hi

look at this post and this post, they should explains most of the questions you have about the designer plugin option.

Now your error is due to the fact you're trying to link with the debug version of qtscript (cannot open file 'QtScriptd.lib') vs the release version ('QtScript.lib' i.e. no 'd'). Maya only comes with the 'release' version of QT.

-cyrille

archangellw commented 8 years ago

hello ! when I execute the test code, there has a error : "name 'ok' is not defined !" please help!

archangellw commented 8 years ago

i find the solution !thanks !