Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #53587 > unrolled thread
| Started by | Mohsen Pahlevanzadeh <mohsen@pahlevanzadeh.org> |
|---|---|
| First post | 2013-09-04 02:23 +0430 |
| Last post | 2013-09-04 02:23 +0430 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: unbound method () must be called with ... instance as first argument (got nothing instead) Mohsen Pahlevanzadeh <mohsen@pahlevanzadeh.org> - 2013-09-04 02:23 +0430
| From | Mohsen Pahlevanzadeh <mohsen@pahlevanzadeh.org> |
|---|---|
| Date | 2013-09-04 02:23 +0430 |
| Subject | Re: unbound method () must be called with ... instance as first argument (got nothing instead) |
| Message-ID | <mailman.20.1378245212.5461.python-list@python.org> |
Solved, i changed my connect function to:
QtCore.QObject.connect(self.pushButtonAdd,
QtCore.SIGNAL(_fromUtf8("clicked()")),self.showHideConstructor.showFindMaterials)
On Wed, 2013-09-04 at 02:00 +0430, Mohsen Pahlevanzadeh wrote:
> 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?
>
>
>
Back to top | Article view | comp.lang.python
csiph-web