Yo!

I have a couple of years of experience in maintaining Qt programs, but have never created a non-trivial application from scratch. Now I suddenly find myself confused by requirements for the topmost architecture. Once I get up to speed I'm sure I'll be able to add stuff to the software without problems, but how do I structure the entire thing, starting right from main.cpp?

This exact question was asked in this thread, but the answers are not satisfactory. I do not want to use the full, heavy model/view approach, with all the Qt classes that have "Model", "Delegate" or "View" in the name. Yet obviously I want some kind of wall of separation between UI and program logic.

Currently main() instantiates QApplication, QMainWindow and my own general manager class. The mainwindow holds some common controls directly as member variables and will hold instances of sub-views with their own UI components. The manager opens configuration files, handles communication protocols and generally makes things happen. Anything in the UI part of the program will be subclassed from QWidget while anything in the logic part will inherit QObject.

Thus, the questions are --
  • Where should I instantiate the mainwindow and manager classes?
  • Does either of the instances hold a pointer to the other?
  • How do I implement an interface between them -- where will the connect() commands go?

Pray grant succour, grand architectural design is quite vexing.