|
[Kde-games-devel] Problem with signals and slots: msg#00082kde-games-devel
I am having some problem when I tried to connect signals and slots of different classes. It was not a problem when I connected signals and slots within the same class(I even don't included the moc file!). This is what I have done to connect two different classes: I have a signal declared in MainWindow(inheritx kxmlGuiWindow) class named signalLoadTheme() and a slot in ThemeManager class(inherits QSvgRenderer) named slotLoadTheme(). I created a instance of ThemeManager in MainWindow name m_gameTheme( ThemeManager* m_Theme) and connected them in MainWindow using: connect(this, SIGNAL( signalLoadTheme()), m_gameTheme, SLOT( slotLoadTheme() )); I used Q_OBJECT in both of the classes at first (tried also including moc files). But, this is not working, my program is crashing. mahfuz@mahfuz-desktop:/usr/local/bin$ ./TestSignalSlot KCrash: Application 'TestSignalSlot' crashing... sock_file=/home/mahfuz/.kde/socket-mahfuz-desktop/kdeinit4__0 Warning: connect() failed: : No such file or directory KCrash cannot reach kdeinit, launching directly. The necessary parts of my program is attached here(Not full, it is big). Please Help. Also, let me know, when and why including the moc file is must. Thanks in advance. Mahfuz
kde-games-devel mailing list kde-games-devel@xxxxxxx https://mail.kde.org/mailman/listinfo/kde-games-devel
|
|
||||||||||||||||||||||||||
|
|
|
| News | Mail Home | sitemap | FAQ | advertise |