So there's the source files that qt created for me (main.cpp and program.cpp). I made with Qt Designer the basics of a dialog, and now I'd like to do something like:
Creating window1.cpp and window1.h;
Creating a class like class wnd1 and put some functions and slots to use the connect function to handle buttons' signals.

So far what I could do was handling this signals inside program.cpp, but everything I tried to do that at window1.cpp failed (like not having connect accept my class, slots not being allowed to be declared, etc). How could be an intelligent way to do that? I don't want to do that all inside program.cpp, it would be a mess because the program will have lots of tabs and controls. I hope my question is clear. If possible, I'd like some examples.

Thanks.