[Qt-interest] program execution issue

Malyushytsky, Alex alex at wai.com
Fri Mar 13 05:15:07 CET 2009


I normally don't  use Designer to anything except widget design, skipping slots creation and connection in Qt4 , so I might be wrong.
But according to my impression this message means that you are trying to connect slot which does not exist in QDialog using the pointer to QDialog.

I assume TeacherForm is a  pointer to QDialog. In this case this is a problem. To make this code work you can crate your own class CTeacherForm (derived from  QDialog ), add openColorDialog() slot there  and promote QDialog in QtDesigner to CteacherForm.

If  TeacherForm is already a subclass of QDialog, check that slot openColorDialog() exist,  Q_OBJECT macro is defined, etc.

Hope this helps,
            Alex Malyushytsky


________________________________________
From: qt-interest-bounces at trolltech.com [mailto:qt-interest-bounces at trolltech.com] On Behalf Of Zine eddine Bendjaballah
Sent: Thursday, March 12, 2009 3:49 AM
To: qt-interest
Subject: [Qt-interest] program execution issue

Hi,

I have QDialog Widget created in Qt Designer, this dialog contains a button that open a QColorDialog box. So I've created a slot called openColorDialog() in designer that I attached to the clicked() signal.
The compilation of the program goes without error, but when I run the program and click on that button nothing heppen and the application output window of qt creator displays the following message:

Object::connect: No such slot QDialog::openColorDialog() in Interface\/ui_teacherform.h:121
Object::connect: (sender name: 'toolButton')
Object::connect: (receiver name: 'TeacherForm')

The QDialog has also others slots that are correctly executed when the corresponding signal arises.

In the line 121 of the ui_teacherform.h this code:
QObject::connect(toolButton, SIGNAL(clicked()), TeacherForm, SLOT(openColorDialog()));

I'm suspecting the "\/" symbole in the pathname.

Any help is welcom.

Cheers.
--
Zine Eddine Bendjaballah



---------------------------------------------------------------------------------------------------
Weidlinger Associates, Inc. made the following annotations.

"This message and any attachments are solely for the intended recipient and may contain confidential or privileged information. If you are not the intended recipient, any disclosure, copying, use, or distribution of the information included in this message and any attachments is prohibited. If you have received this communication in error, please notify us by reply e-mail and immediately and permanently delete this message and any attachments. Thank you."

"Please consider our environment before printing this email."




More information about the Qt-interest-old mailing list