[Qt-interest] Strange slot problem

Marek Bronowicki marek at cyberdeus.pl
Mon Apr 19 10:55:14 CEST 2010


I found the problem....

Greatest invention of all universe: UAC in Vista and denying rights to 
my own files. MOC wasn't generating at all. It was the same from the 
last copy that I made before dataloss :)

No comment. Thanks

Best Regards,
Marek Bronowicki

W dniu 2010-04-19 10:22, Donal O'Connor pisze:
> Pure guess and being a while since I've done anything with QT but must 
> you register the QSqlError type with the MOC.
>
> http://doc.trolltech.com/qq/qq14-metatypes.html
>
> On Mon, Apr 19, 2010 at 9:12 AM, Marek Bronowicki <marek at cyberdeus.pl 
> <mailto:marek at cyberdeus.pl>> wrote:
>
>     Hello
>
>     my QT: QT 4.6.2 MSVC 2008
>
>     my db.h looks like this:
>
>     class DB : public QObject
>     {
>         Q_OBJECT
>
>     public:
>         DB(QObject *parent);
>
>     [...]
>
>     signals:
>         void ConnectionSuccess();
>         void ConnectionFailure();
>         void ShowError(QString, QSqlError);
>
>     private slots:
>         void CSuc();
>         void ConnectionFailureSLOT();
>         void ErrorMsg(QString query, QSqlError error);
>
>     };
>
>
>     and db.cpp looks like this:
>
>
>     DB::DB(QObject *parent) : QObject(parent)
>     {
>        
>     QObject::connect(this,SIGNAL(ConnectionSuccess()),this,SLOT(CSuc()));
>
>     QObject::connect(this,SIGNAL(ShowError(QString,QSqlError)),this,SLOT(ErrorMsg(QString,QSqlError)));
>      // other code
>     }
>
>     void DB::CSuc()
>     {
>       // code
>     }
>
>     void DB::ErrorMsg(QString query, QSqlError error)
>     {
>         QDialog *d = new QDialog((QWidget *)this->parent());
>         d->setWindowTitle("Błąd zapytania!");
>         QTextEdit *errmsg = new QTextEdit(d);
>         errmsg->setHtml("Zapytanie zgłosiło błąd<br />"+query+"<br /><br
>     />"+error.text());
>         QVBoxLayout *dialoglayout = new QVBoxLayout(d);
>         dialoglayout->addWidget(errmsg);
>         d->setLayout(dialoglayout);
>         d->exec();
>     }
>
>     the strangest thing is that ErrorMsg slot is working properly but CSuc
>     slot is Object::connect: No such slot DB::CSuc()
>
>
>     Any help will be thankful :)
>
>
>     Best Regards,
>     Marek Bronowicki
>
>     _______________________________________________
>     Qt-interest mailing list
>     Qt-interest at trolltech.com <mailto:Qt-interest at trolltech.com>
>     http://lists.trolltech.com/mailman/listinfo/qt-interest
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100419/09609e70/attachment.html 


More information about the Qt-interest-old mailing list