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

> 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 (potentiall=
y 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.

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

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

-- =

David Faure, faure@kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).


>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscrib=

e <<