This forum has been archived. All content is frozen. Please use KDE Discuss instead.

[SOLVED] PyKDE4 is rejecting SIGNAL

Tags: None
(comma "," separated)
RyanMcCoskrie
Registered Member
Posts
39
Karma
0
OS

[SOLVED] PyKDE4 is rejecting SIGNAL

Thu Dec 04, 2008 10:10 am
I've been having trouble with KDE4 development on Fedora 10 (C++ headers
giving me attitude, missing cmake data) but this one really is where I need help.
I've tried to set up a signal just like the tutorials online say to but I got this
error:

self.connect(self.QuitButton, SIGNAL("clicked ()"), self.close)


Does anyone know a work around?

Last edited by RyanMcCoskrie on Mon Dec 08, 2008 9:05 am, edited 1 time in total.


RyanMcCoskrie, proud to be a member of KDE forums since 2008-Dec.
User avatar
einar
Administrator
Posts
3402
Karma
7
OS

RE: PyKDE4 is rejecting SIGNAL

Thu Dec 04, 2008 10:51 am
Which error? Perhaps the paste killed off part of the lines...


"Violence is the last refuge of the incompetent."
Image
Plasma FAQ maintainer - Plasma programming with Python
RyanMcCoskrie
Registered Member
Posts
39
Karma
0
OS

RE: PyKDE4 is rejecting SIGNAL

Thu Dec 04, 2008 7:35 pm
Sorry about that, when I posted that it was when I should have been asleep (southern hemisphere).

self.connect(self.QuitButton, SIGNAL("clicked()"), self.close)
NameError: global name 'SIGNAL' is not defined


RyanMcCoskrie, proud to be a member of KDE forums since 2008-Dec.
User avatar
JontheEchinda
KDE Developer
Posts
309
Karma
4
OS

RE: PyKDE4 is rejecting SIGNAL

Thu Dec 04, 2008 8:38 pm
Could you paste what modules/classes you're importing?


JontheEchinda, proud to be a member of the Kubuntu team since July 2008.
Image
Image
RyanMcCoskrie
Registered Member
Posts
39
Karma
0
OS

RE: PyKDE4 is rejecting SIGNAL

Fri Dec 05, 2008 3:51 am
Sure:
from PyKDE4.kdeui import *
from PyKDE4.kdecore import *


As I said I followed all of the instructions on line.
I'm pretty sure the issue is in the modules.


RyanMcCoskrie, proud to be a member of KDE forums since 2008-Dec.
User avatar
JontheEchinda
KDE Developer
Posts
309
Karma
4
OS

RE: PyKDE4 is rejecting SIGNAL

Fri Dec 05, 2008 1:48 pm
You will also need to Import QtCore from PyQt4 if you want slots and signals to work, at least in my experience.


JontheEchinda, proud to be a member of the Kubuntu team since July 2008.
Image
Image
RyanMcCoskrie
Registered Member
Posts
39
Karma
0
OS

RE: PyKDE4 is rejecting SIGNAL

Sun Dec 07, 2008 12:16 am
JontheEchinda wrote:You will also need to Import QtCore from PyQt4 if you want slots and signals to work, at least in my experience.


Worked perfectly, thanks for that.
The tutorials on techbase.kde.org will need updating though.


RyanMcCoskrie, proud to be a member of KDE forums since 2008-Dec.
User avatar
dtritscher
Registered Member
Posts
46
Karma
0

RE: PyKDE4 is rejecting SIGNAL

Sun Dec 07, 2008 11:01 am
RyanMcCoskrie wrote:The tutorials on techbase.kde.org will need updating though.

Then please update it. It's a wiki ;)


dtritscher, proud to be a member of KDE forums since 2008-Oct.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

RE: PyKDE4 is rejecting SIGNAL

Sun Dec 07, 2008 8:25 pm
If your problem has been resolved, could you please place [SOLVED] at the start of the thread subject? Thanks in advance.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]


Bookmarks



Who is online

Registered users: Bing [Bot], Evergrowing, Google [Bot], rblackwell