Hello!I am a new.In my program,I got a problem.I have a slot in one *.cpp file,and a signal in another *.cpp file.How can I use this signal to connect to that slot?If it can be done.I hope you can give a example code.Thanks very much.
Hello!I am a new.In my program,I got a problem.I have a slot in one *.cpp file,and a signal in another *.cpp file.How can I use this signal to connect to that slot?If it can be done.I hope you can give a example code.Thanks very much.
Connections are done between objects.
If you have class A in file a.cpp and class B in file b.cpp:
Qt Code:
A *a = new A; B *b = new B; connect(a, SIGNAL(...), b, SLOT(...));To copy to clipboard, switch view to plain text mode
brantyou (15th September 2010)
Thanks for your help very much ! I do that. You are right! Because your help,I have known something that unknown before.
Bookmarks