hello

i have a qt interface driven by a tcp connection with an engine in nemerle.

for the connection, i use an instance (called socket) of my guiClient class derived from QSocket. it is created in main.cpp, where i also create mainWin, ie. an instance of my mainWindow class derived from QMainWindow. a pointer to socket is passed to mainWin.

in mainWin, i try to use guiClient's method called socketSend.

everything works fine until i use the Q_OBJECT macro in mainwindow.cpp.
this is the error i keep getting:
Qt Code:
  1. In file included from moc_mainwindow.cpp:11:
  2. mainwindow.h: In constructor `mainWindow::mainWindow(QWidget*, char*, guiClient*)':
  3. mainwindow.h:26: error: `socketSend' undeclared (first use this function)
  4. mainwindow.h:26: error: (Each undeclared identifier is reported only once for each function it appears in.)
  5. make: *** [moc_mainwindow.o] Błąd 1
To copy to clipboard, switch view to plain text mode 
i've tried creating the socket in mainwindow instead of main but the whole thing repeats itself whenever i try to pass it to some widget created from mainWin.

maybe the whole idea of defining a seperate class for socket is wrong? but how else can i manage it? or maybe should i pass a reference to socket in some other way than a pointer?

please, help me...