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

List:       kde-devel
Subject:    Re: newbie question
From:       Martijn Klingens <mklingens () yahoo ! com>
Date:       2001-05-27 22:06:08
[Download RAW message or body]

On Sunday 27 May 2001 21:20, Stephan Oehlert wrote:
> Hi
>
> Kevin, this did not work. But if you use
> listView = new KListView(this);
> instead of
> KListView* listView = new KListView();
> then everything is fine. Do you know why?

Because leaving out the parent would give a widget a parent of 0 (NULL). The 
result is that the widget gets its own window (and only after show() has been 
manually called).

In Qt _every_ widget in a window needs to have a proper parent. The parent is 
always the widget in which another widget needs to get embedded (i.e. the 
window if the widget isn't in another widget)

Please read the Qt tutorials and the other beginner topics from the docs for 
more information.

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