[Qt-interest] Slots in threads ?
John McClurkin
jwm at nei.nih.gov
Thu Aug 27 19:09:00 CEST 2009
Patric wrote:
> Hello,
> I have a little gui program with one worker thread. I want to stop and
> start the thread from the gui. So I put some slots inside the thread.
> But now I'm getting some errors on compilation :
>
>
> mainwindow.cpp: In constructor `MainWindow::MainWindow(QWidget*)':
>
> mainwindow.cpp:35: error: no matching function for call to
> `MainWindow::connect(Board*&, const char*, Engine*, const char*)'
Do you really want this ^^^^^^ to be Board*&? A reference to a pointer?
How about just a reference or just a pointer, ie Board& or Board*?
>
> c:/Qt/2009.03/qt/include/QtCore/../../src/corelib/kernel/qobject..h:202:
> note: candidates are: static bool QObject::connect(const QObject*, const
> char*, const QObject*, const char*, Qt::ConnectionType)
>
> c:/Qt/2009.03/qt/include/QtCore/../../src/corelib/kernel/qobject..h:308:
> note: bool QObject::connect(const QObject*, const char*, const char*,
> Qt::ConnectionType) const
>
>
>
> Am I allowed to put slots in threads ?
>
> Regards
More information about the Qt-interest-old
mailing list