From kde-devel Thu Mar 22 09:36:25 2001 From: Martijn Klingens Date: Thu, 22 Mar 2001 09:36:25 +0000 To: kde-devel Subject: Re: some concepts... X-MARC-Message: https://marc.info/?l=kde-devel&m=98525395727098 On Wednesday 21 March 2001 08:10, Pupeno wrote: > I'm starting KDE developing and I have some questions about some basic > concepts. > 1. When the widgets are going to be managed by QGridLayout (or any other > Layout), which should be thair parent? , the QGridLayout object?, the > QGridLaout's parent or Null or what ? The object that holds the Layout should also be the parent of the embedded widgets. If you are nesting layouts, you'll have to be careful, because there can't be more than one layout in a widget. See my post from yesterday for more details, but in short: create layouts with the master layout as parent or create them without a parent. addLayout() will take ownership afterwards, so you don't need to delete it yourself. > 2. When I have a widget, that will contain a QGridLayout and everything > inside it, should I base my class in QWidget and have a QGridLayout inside > or should I base my class in QGridLayout directly ? You can't base the widget on QGridLayout, because the layout classes are not widgets themselves. They manage widgets but they cannot contain them. So the answer is: base it on a QWidget. Good luck, Martijn >> Visit http://master.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<