Hi, hoping to get some help re. code design.
I've been codeing on and off for a few years now, started with HTML, Javascript, PHP then moved onto C, C++. Also dabbled in VB and Delphi. Just so you know where I'm kind of up to I know all the basics of C++ and have a basic understanding of encapsulation, polymorphism etc but I'm still struggling a bit getting everything sorted in my head where I don't have to stop and think about it before I do something.

So anyway my issue is really with OOP I guess and how to organise my code accross multiple files. I'm at the stage where I want to start doing larger projects but just never sure of the correct way to do things. I should mention I'm using QTCreator for UI design and codeing.

eg. If I have a project consisting of a widget stack, maybe 5-10 pages, each interacting with each other and drawing data from an SQlite database. SO I have files MyWindow.ui, MyWIndow.cpp, MyWindow.h and I have the MyWindow class.

Should I -
- keep each page of the widget stacks code to it's own .cpp and header files. ie a page_1_class.cpp, page_1_class each with it's own class. If so what is the best way to access the base class which is the class all the widgets belong to.

- keep all the pages code in the base class (declare all my functions etc in the base header file) and just put the definitions in there own .cpp files.

- keep all the QT related things (anything that directly interacts with a QWidget) to the base class and just farm out the data manipulation stuff.

- Is it acceptable to create individual widget projects for each page and then just add these projects to the widget stack on a mainwindow.

Any help or push in the right direction appreciated.
Cheers