[Kde-bindings] ruby - dispose QT button OK, plasma button crash
Petr Sigut
bindings at sigut.net
Sat Oct 17 18:56:19 UTC 2009
I found solution
while ((@child = @layout.itemAt(0)) != nil)
@layout.removeItem(@child)
@child.dispose
end
plasma_button get by @layout.itemAt(0) is that type:
<Qt::GraphicsLayoutItem:0xace878c4> and could be dispose() flawlessly.
if I "puts plasma_button" it is that type: <Plasma::Label:0xace89cdc> and
dispose() crash...
but still I do not know why:)
On Friday 16 of October 2009 21:29:06 Petr Sigut wrote:
> Hello,
>
> I am writing plasmoid in ruby and I need to remove widgets on the fly, I
> was pointed to dispose method, but if I use it, the plasmoid crash, when I
> try dispose QT button, everything works.
>
>
> # disposing QT button is ok
> qt_button = Qt::PushButton.new('Hello World!')
>
> # prints object
> puts qt_button
>
> # prints nil
> puts qt_button.dispose
>
> # disposing Plasma button is crash
> plasma_button = Plasma::PushButton.new
>
> # prints object
> puts
>
> # crash
> plasma_button.dispose
>
> Zipped plasmoid, just plasmapkg -i test-widget.zip and
> plasmoidviewer test-widget
> http://tmp2.sigut.net/test-widget.zip
>
> I appreciate any help, I tried several different methods (removeAt, ...)
> but with no luck. I will also provide any other information needed.
>
> I use Ubuntu 9.10 beta, KDE 4.3.2
>
> Petr Sigut
> _______________________________________________
> Kde-bindings mailing list
> Kde-bindings at kde.org
> https://mail.kde.org/mailman/listinfo/kde-bindings
>
More information about the Kde-bindings
mailing list