Thanks for your replies!

I understand that there should be separate classes for GUI, for data access and data processing. That's clear for me.

But as usual I have another question. Because the object responsible for the GUI is created in the "main.cpp" file, should I treat it as a base object, and create objects responsible for data processing in GUI objects (and in objects responsible for data processing create objects of data access layer)? Or maybe objects of different layers (GUI, data processing, data access, ...) should exist side by side?
Which approach is better?