S
S
Sazoks2020-07-27 10:22:46
Qt
Sazoks, 2020-07-27 10:22:46

How to properly design a GUI in Qt?

Hello.
I am writing a small project with a GUI in Qt, but apparently I do not understand at all how the GUI architecture should be implemented. Now, so that you understand, I did this:
There is a class inherited from QMainWindow. It stores objects - forms of the program.
On certain events, the current form is deleted, a new one is created and set in setCentralWidget(). I did this so that the whole program works in one window.

But I think I'm doing something wrong. Somehow the code looks ugly. In addition, I have windows in which one part is the same, but I don’t know how to make inheritance so as not to duplicate code ...

In general, tell me how to properly design a GUI in Qt, or advise some books on this topic.
Thanks!!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
Jacob E, 2020-07-27
@Zifix

Go straight to QML , it will be much easier and clearer.
https://qmlbook.github.io/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question