signal is not working
-
@frnklu20 said in signal is not working:
but how can i write it in the new sintax?
By looking into the documentation
-
You are missing the & for the function parameters.
-
And what error exactly ?
-
in the no matching member it says:
mainwindow.cpp:25:5: error: no matching member function for call to 'connect'
qobject.h:228:43: note: candidate function template not viable: requires at least 4 arguments, but 2 were provided
qobject.h:260:13: note: candidate function template not viable: requires 3 arguments, but 2 were provided
qobject.h:269:13: note: candidate function template not viable: requires at least 4 arguments, but 2 were provided
qobject.h:300:13: note: candidate function template not viable: requires 3 arguments, but 2 were provided
qobject.h:308:13: note: candidate function template not viable: requires at least 4 arguments, but 2 were provided
qobject.h:463:41: note: candidate function not viable: requires at least 3 arguments, but 2 were provided
qobject.h:208:36: note: candidate function not viable: requires at least 4 arguments, but 2 were provided
qobject.h:211:36: note: candidate function not viable: requires at least 4 arguments, but 2 were provideddon't know what that means
-
Since you're doing the connect in a class which is not derived from QObject or in main() you have forgot 'QObject::' before connect since it's a static function of QObject
And you've a syntax error in your code - '&DiagramScene::addtreeitem),'
-
yeah i fixed it! but it gives me an error in the connect

if i put the ¶meter in the objects it says cannot take the adress of an rvalue of type MainWindow and no matching member function for call to 'connect'
-
yeah i fixed it! but it gives me an error in the connect

if i put the ¶meter in the objects it says cannot take the adress of an rvalue of type MainWindow and no matching member function for call to 'connect'