Qt-interest Archive, March 2002
difference between...
Message 1 in thread
Hi, What is it the exact difference between A class that inherits of QWidget, and a class that inherits of QWidget AND is "daughter" of QWidget?
Because I have a problem with one class i make and perhaps it's a possible reason of my problems.
Thanks
Message 2 in thread
Gender aside, inheritance is a C++ thing, presumably you know about that.
Parent-child relationships are a Qt thing. For example when you use
setGeometry() to position a widget, the coordinates are relative to the
parent. And when you destruct a QWidget, its children are automatically
destroyed.
What you describe is the usually the case in Qt apps, problems are more
likely to arise if you go against this paradigm without thinking carefully
about what you are doing.
--
[ signature omitted ]