[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: some concepts...
From:       Martijn Klingens <mklingens () yahoo ! com>
Date:       2001-03-22 9:36:25
[Download RAW message or body]

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 <<

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic