unbound method () must be called with ... instance as firstargument (got nothing instead)

  • Thread starter Mohsen Pahlevanzadeh
  • Start date
M

Mohsen Pahlevanzadeh

Dear all,

I have the following two lines code in my setup frame:
//////////////////////
self.showHideConstructor = ui.interface.interface.ShowHide()
QtCore.QObject.connect(self.pushButtonAdd,
QtCore.SIGNAL(_fromUtf8("clicked()")),self.showHideConstructor,ui.interface.interface.ShowHide.showFindMaterials())
//////////////////////

and i have module ui.interface.interface , it contains ShowHide class,
and it consists showFindMaterials() method.

When i run program , i get the following traceback :
///////////////////////////////////////////
Traceback (most recent call last):
File "./main.py", line 113, in <module>
main()
File "./main.py", line 94, in main
interfaceObj.showMaterials()
File "/home/mohsen/codes/amlak/amlak/src/ui/interface/interface.py",
line 82, in showMaterials
self.ui.setupUi(self.Frame)
File "/home/mohsen/codes/amlak/amlak/src/ui/materialsFrame.py", line
92, in setupUi
QtCore.QObject.connect(self.pushButtonAdd,
QtCore.SIGNAL(_fromUtf8("clicked()")),self.showHideConstructor,ui.interface.interface.ShowHide.showFindMaterials())
TypeError: unbound method showFindMaterials() must be called with
ShowHide instance as first argument (got nothing instead)
///////////////////////////////////////////////

Where's problem?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top