On Wednesday 07 January 2004 14:13, you wrote:

Pai...parca era:

QObject::connect(emitor, SIGNAL(semnal), receptor, SLOT(slot) );

however...mai bine da-mi sursele...

> Am asa, dar nu imi iese ceva:
>
> test.h:
> #include <qobject.h>
>
> class SimpleServer;
> class ClientSocket;
>
> class Test : public QObject
> {
>   Q_OBJECT
>
> public:
>   Test();
>   ~Test();
>
> public slots:
>
>   void mesaj( const QString &s );
>   void connectionClosed();
>   void newConnect( ClientSocket *s );
>
> private:
>   SimpleServer *server;
> };
>
> si test.cpp:
> [...]
> Test::Test() : QObject()
> {
>   qWarning( "Test::Test\n" );
>
>   server = new SimpleServer;
>   connect( server, SIGNAL(newConnect(ClientSocket*)),
> SLOT(newConnect(ClientSocket*)) ); }
> [...]
>
>
> si cand dau make:
>
> $ make
> g++ -c -pipe -Wall -W -O2  -DQT_NO_DEBUG -DQT_SHARED
> -DQT_THREAD_SUPPORT -I/usr/local/qt/mkspecs/default -I.
> -I/usr/lib/qt-3.1/include -I.ui/ -I.moc/ -o .obj/test.o test.cpp
> test.cpp: In constructor `Test::Test()':
> test.cpp:9: no matching function for call to
> `Test::connect(SimpleServer*&,
>    const char[27], const char[27])'
> /usr/lib/qt-3.1/include/qobject.h:116: candidates are: static bool
>    QObject::connect(const QObject*, const char*, const QObject*,
> const char*)
> /usr/lib/qt-3.1/include/qobject.h:227:                 bool
>    QObject::connect(const QObject*, const char*, const char*) const
> make: *** [.obj/test.o] Error 1
>
> On Wed, 7 Jan 2004, Balu Stefan wrote:
> > On Wednesday 07 January 2004 13:50, you wrote:
> >
> > lol, nu ai bucla de asteptare...
> > se reimplementeaza newConnection...
> >
> > http://doc.trolltech.com/3.2/clientserver-example.html

-- 
Stefan, a simple Debian user.
Linux registered user: #272012
[Linux is Friendly. It's just selective about who his friends are.]


--- 
Detalii despre listele noastre de mail: http://www.lug.ro/


Raspunde prin e-mail lui