[kde-de] Re: Kparts problem

Thomas Schwarzgruber thomas_schwarzgruber at gmx.at
Mi Aug 27 18:54:07 CEST 2003


Hallo Leute !

Habe folgendes Mail an kde-devel geschickt und keine Antwort erhalten.
Nun probiere ich kde-de. Sorry für das Englisch habe aber keine Lust das alles 
nochmal zu schreiben (bzw. zu übersetzen). vielleicht kann mir trotzdem wer 
helfen 

Dank im Voraus 

Thomas Schwarzgruber

Hier die Message:


On Tuesday 26 August 2003 18:49, Thomas Schwarzgruber wrote:
> Hello !
>
> I just adopted a application from normal KDE3 to the KDE Parts scheme.
> Everything worked fine, except one strange behavior of a widget.
>
> I've put all my different widgets into one class. If i instantiate from
> this class in the constructor of my part, the widget seems to be in front
> of the toolbar and is far too small. Now the strange thing: if i make a
> qsplitter and set the qsplitter as widget (setWidget) and then instantiate
> my class and child it to the qsplitter it shows my widget correctly (beside
> that it is on the right side of the splitted view)
>
> I tried already a lot (QHbox etc. ) but nothing worked besides the
> qsplitter solution.
>
> this is my qsplitter solution:
>
> kompile_partedPart::kompile_partedPart( QWidget *parentWidget, const char
> *widgetName,
>                                   QObject *parent, const char *name )
>
>     : KParts::ReadOnlyPart(parent, name)
>
> {
>     // we need an instance
>     setInstance( kompile_partedPartFactory::instance() );
>     new kompileBrowserExtension( this );
>
>     QSplitter *widget = new QSplitter(parentWidget);
>
>     m_widget = new KompileEngine(widget);
>
>     // create our actions
>     KStdAction::open(this, SLOT(fileOpen()), actionCollection());
> <snip>
>
>     // notify the part that this is our internal widget
>     setWidget(widget);
>
> }
>
> Can anybody help me with that problem ?
>
> Best regards
>
> 	Thomas Schwarzgruber