From kde-devel Tue Sep 27 19:13:21 2005 From: David Faure Date: Tue, 27 Sep 2005 19:13:21 +0000 To: kde-devel Subject: Re: Creating a kpart component that uses a custom widget Message-Id: <200509272113.23956.faure () kde ! org> X-MARC-Message: https://marc.info/?l=kde-devel&m=112784846808375 On Tuesday 27 September 2005 19:58, Kevin Krammer wrote: > On Tuesday 27 September 2005 17:26, David Faure wrote: > > On Tuesday 27 September 2005 17:08, Juan Luis Baptiste wrote: > > > >I might be misunderstanding you but why do you create a dialog subclass > > > > if you don't want it to be a separate window? > > > > > > Because it was a separate window before, now I want to embed it in > > > another app. I tried changing it to a QWidget but I had the same result. > > > > You need to go back to a QWidget, and maybe you need to implement its > > "virtual QSize sizeHint() const" method, to give a reasonable default size > > to the widget (if it doesn't have a layout). Check in code with isVisible() > > whether it's actually shown... > > And make sure it gets a non-0 parent widget. > > Hmm, are you sure it is not required to either change to a non-top-level base > class or reparent the dialog based one to get it embedded? Yes, we agree, it is required to change back to a QWidget or derivative instead of a QDialog, as I said. Using a QDialog in kparts makes no sense. -- 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 unsubscribe <<