From kde-devel Sun Jun 09 20:11:57 2002 From: "Posta Leo" Date: Sun, 09 Jun 2002 20:11:57 +0000 To: kde-devel Subject: R: Help for KDirLister X-MARC-Message: https://marc.info/?l=kde-devel&m=102365758811620 -----Messaggio originale----- Da: kde-devel-admin@mail.kde.org [mailto:kde-devel-admin@mail.kde.org]Per conto di Björn Sahlström Inviato: domenica 9 giugno 2002 1.28 A: kde-devel@kde.org Oggetto: Re: Help for KDirLister On Saturday 08 June 2002 23.15, Posta Leo wrote: > Sorry, I am a beginner in the use of kdevelop. > > Can someone help me sending an example code about the use of kDirLister ? > > Thanks. > > >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to > >> unsubscribe << I suggest that you take alook in KDirOperator source code. -- Mvh Björn Sahlström kbjorn@users.sourceforge.net >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe << Thanks for your help. I'm trying to use KDirWatch. I have written the following source code for test: #include #include #include #include #include #include class MyThread : public QThread { public: virtual void run(); }; void MyThread::run() { qDebug("Directory updated"); } class DirectoryLister : public QObject { Q_OBJECT public slots: void slotStartThread(); }; void DirectoryLister::slotStartThread() MyThread a; emit a.start(); emit a.wait(); } int main(int argc, char *argv[]) DirectoryLister lister; KDirWatch *dirWatch = new KDirWatch(); QString My_Dir="/home/atex/test"; DirectoryLister::connect(dirWatch, SIGNAL(dirty(My_Dir)), &lister, SLOT(slotStartThread())); dirWatch->addDir(My_Dir); dirWatch->startScan(true, false); dirWatch->stopScan(); } #include "dirlister.moc" The compile process it's ok, but I see the following errors when it's performed: QObject::connect: No such signal KDirWatch::dirty(My_Dir) QObject::connect: (sender name: 'unnamed') QObject::connect: (receiver name: 'unnaned') Can you tell me why ? Thanks. >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<