Hmm. For Maya 2012 you should be using 4.7.1
It might still work but you could possibly run into API differences. You might 
want to upgrade.

Glad you like the tutorial! Hit me up with any further questions either 
directly, or on here. 


On Nov 15, 2012, at 3:45 PM, Jonas Avrin wrote:

> I have 4.5.3 compiled against Maya2012 it seems.  Thanks for the update and 
> great tutorials, seriously awesome.
> 
> On Thursday, November 15, 2012 12:18:22 AM UTC-5, Justin Israel wrote:
> Hey Jonas,
> 
> Are you by chance using PyQt4 with Maya 2011? It seems in Qt 4.5.3, the 
> QDoubleValidator constructor did not have an *optional* parent argument:
> http://doc.qt.digia.com/4.5/qdoublevalidator.html#QDoubleValidator
> 
> QDoubleValidator::QDoubleValidator ( QObject * parent )
> 
> If you can pop open the calc_app2.py file, make these changes:
> 87:           self.ui.inputA.setValidator(QtGui.QDoubleValidator(self))
> 88:           self.ui.inputB.setValidator(QtGui.QDoubleValidator(self))
> 
> Note I am passing in `self` to the QDoubleValidator. `self` is the QWidget 
> subclass, and it tells QDoubleValidator to use it as the parent object. 
> 
> I can make these fixes and update the project files for future people using 
> Qt 4.5.3 with this tutorial. And I will try to scan everything to see if any 
> other constructors are missing the argument. If you see this error again, 
> just pass in the `self` variable.
> 
> Thanks for pointing this out. Sorry you were faced with it.
> 
> Let me know if you run into anything else!
> 
> -- justin
> 
> 
> 
> On Nov 14, 2012, at 6:02 PM, Jonas Avrin wrote:
> 
>> Getting this error when running example code calc_app2.py on Linux:
>> 
>> python calc_app2.py 
>> Traceback (most recent call last):
>>   File "calc_app2.py", line 143, in <module>
>>     win = Window()
>>   File "calc_app2.py", line 57, in __init__
>>     self.calcWidget = Calculator()
>>   File "calc_app2.py", line 87, in __init__
>>     self.ui.inputA.setValidator(QtGui.QDoubleValidator())
>> TypeError: arguments did not match any overloaded call:
>>   QDoubleValidator(QObject): not enough arguments
>>   QDoubleValidator(float, float, int, QObject): not enough arguments
>> 
>> 
>> -- 
>> view archives: http://groups.google.com/group/python_inside_maya
>> change your subscription settings: 
>> http://groups.google.com/group/python_inside_maya/subscribe
> 
> 
> -- 
> view archives: http://groups.google.com/group/python_inside_maya
> change your subscription settings: 
> http://groups.google.com/group/python_inside_maya/subscribe

-- 
view archives: http://groups.google.com/group/python_inside_maya
change your subscription settings: 
http://groups.google.com/group/python_inside_maya/subscribe

Reply via email to