[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: [kdvi] No module (application/x-dvi) found
From: Angus Leeming <leeming () lyx ! org>
Date: 2005-07-26 12:50:22
Message-ID: dc5bie$hcv$1 () sea ! gmane ! org
[Download RAW message or body]
David Faure wrote:
> On Tuesday 26 July 2005 14:24, Angus Leeming wrote:
>> KMultiPage::KMultiPage(QWidget *parentWidget, const char *widgetName,
>> QObject *parent, const char *name);
>>
>> what's the difference bwtween "parentWidget" and "parent"? I've done as
>> you have done, passing "parent" to the derived-from class (here QWidget)
>> and using parentWidget in the KMultiPage c-tor, but it would be nice to
>> know what I'm doing ;-)
>
> A part is a (non-graphical) object, which has a qobject parent.
> A part is associated with a widget, which has a qwidget parent.
> So a part and its widget are two different objects, each with a
> (potentially different) parent.
>
> In your case, if you're turning KMultiPage into a simple widget,
> you can get rid of all this and keep only a QWidget* parentWidget.
Understood. Thanks.
>> Ok. However, to resolve some further compiler errors I had to create:
>> QWidget *widget() { return 0; }
>> The real function is defined in KParts::ReadOnlyPart to return m_widget.
>> On initial construction of the KMultiPage, m_widget is zero. So, dumm
>> question X: do I need it, or am I on the right track?
>
> How about "return this;" instead? Since your KMultiPage is now a qwidget
> itself.
Nice!
Angus
>> Visit http://mail.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