Reputation: 1959
I've seen the main widget referenced in a few QT docs. Does this simply refer to the first widget created after QApplication?
If so, is it automatically the widget to which all user events are sent by default?
If not, could you explain what i'm missing?
Upvotes: 3
Views: 1881
Reputation: 33435
In Qt, any parentless widget is a top-level window by default. Any widget type could be your "main" window. You can have more than one. It's a convention, not a technicality.
QMainWindow incorporates a lot of common features and I recommend you start there unless you want something unusual.
Upvotes: 2
Reputation: 17124
The mainWidget
is a Qt 3
relic, and is no longer actively supported. Its Qt 4
counterpart is the QMainWindow
class.
Upvotes: 2