Maya中的PySide2 - 'module'对象没有属性'QPushButton'

时间:2018-03-31 12:04:32

标签: python pyqt pyside maya

家伙! 试图学习PySide for Maya 2017,从第一步开始,它已经有点令人沮丧了。

from PySide2 import QtGui

button = QtGui.QPushButton()
  • 'module'对象没有属性'QPushButton' 有人知道吗?

2 个答案:

答案 0 :(得分:1)

试试这个方法:

Caused by: java.lang.NoClassDefFoundError: org/springframework/boot/bind/RelaxedPropertyResolver
    at org.apache.camel.spring.boot.util.HierarchicalPropertiesEvaluator.isEnabled(HierarchicalPropertiesEvaluator.java:49)
    at org.apache.camel.spring.boot.util.HierarchicalPropertiesEvaluator.evaluate(HierarchicalPropertiesEvaluator.java:42)
    at org.apache.camel.spring.boot.util.GroupCondition.getMatchOutcome(GroupCondition.java:40)
    at org.springframework.boot.autoconfigure.condition.SpringBootCondition.matches(SpringBootCondition.java:47)
    ... 18 common frames omitted
Caused by: java.lang.ClassNotFoundException: org.springframework.boot.bind.RelaxedPropertyResolver
    at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:338)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    ... 22 common frames omitted

enter image description here

答案 1 :(得分:0)

button = QtWidgets.QPushButton()