Hey guys,here I'm again with some questions!

Well,I have been reading the "C++ GUI with Qt" book and it's not too hard.
I understand the most parts of the code...

But when I don't use the book and try to code something small myself(like a calculator),I have difficulties in 1)where to put specific parts of the code(like:i know that i will put decleration in a .h file and definition in .cpp,but I get confused when it becomes complicated..),are there any rules about what to put where?

2)And one more thing:As I understood,for each new widget/dialog/window i make I have to make 2 new files(.h & .cpp for it)as well,right?

Thank you and please explain if possible where different parts of the code should go!