[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-panel-devel
Subject:    Re: QML global plasmoid callback problem
From:       uomonero <uomonero84 () gmail ! com>
Date:       2012-02-05 18:52:21
Message-ID: CABqMBA_exZY2q2PVB45HH=EZnyw-GMF-Y2kF7oia3J+gcwq1pw () mail ! gmail ! com
[Download RAW message or body]

2012/2/5 uomonero <uomonero84@gmail.com>:
> 2012/2/5 Marco Martin <notmart@gmail.com>:
>> On Sun, Feb 5, 2012 at 3:39 PM, uomonero <uomonero84@gmail.com> wrote:
>>> Hi,
>>> I'm new to plasmoid development. I'm trying to learn how to write a
>>> QML plasmoid, but I encountered a little difficulty with the use of
>>> global plasmoid object.
>>>
>>> This is my simple test code:
>>>
>>> import QtQuick 1.0
>>> import org.kde.plasma.core 0.1 as PlasmaCore
>>> import org.kde.plasma.components 0.1 as PlasmaComponents
>>>
>>> PlasmaComponents.Label{
>>> =A0 =A0 =A0 =A0id: labelTest
>>> =A0 =A0 =A0 =A0text:"Test"
>>>
>>> =A0 =A0 =A0 =A0Component.onCompleted:{
>>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0plasmoid.addEventListener("sizeChanged",=
 sizeChanged);
>>> =A0 =A0 =A0 =A0}
>>> =A0 =A0 =A0 =A0function sizeChanged(){
>>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0print("sizeChanged listener");
>>> =A0 =A0 =A0 =A0}
>>> }
>>>
>>> Running with plasmoidviewer, when I resize the plasmoid nothing is prin=
ted.
>>> What's wrong?
>>
>>
>> uhm, apart that sizeChanged in particular isn't really necessary since
>> the size is the size of the root item, if that label is the plasmoid
>> main script it should work fine
>>
>
> Thanks, Marco.
> Yes, the Label is the plasmoid main script, but the callback just don't w=
ork.
> I tryed also with "userConfiguring" callbacks with same result. The
> sizeChanged function does not seem to be invoked when expected.
>
> Any suggestion for event debugging?

A little update:
Callback on ConfigChanged worked.
_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic