I am new to Qt Creator 4. When I create a new project it gives me the option to choose a base class:
I am confused which to choose. What difference does it make?
Does it also effect the code?
Kindly explain in simple words.
QDialog is specifically designed for dialog or "pop-up" windows. These are dialogs generated from your main application, useful for things like Open/Save dialogs or informational messages.
QMainWindow is a specific widget that has things like a menu bar, tool bar and status bar built-in. This class is useful for the main application window to fit around your main UI.
QWidget is the base of every GUI element, so it's a catch-all. It's less specific than the other two classes, but in exchange it's more flexible.
You should choose the one that best fits what you are creating. Obviously the way you write the code will be effected, as they are different classes, but all are still QWidgets.