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

List:       kde-panel-devel
Subject:    Re: QML style guide
From:       Dmitry Ashkadov <dmitry.ashkadov () rosalab ! ru>
Date:       2012-10-30 12:44:26
Message-ID: 508FCBAA.3060401 () rosalab ! ru
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


30.10.2012 16:01, Sebastian Kügler пишет:
> There, the JS code should probably be in the QML file itself, as that's the
> only place where it's used. For the shared code, you'd import:
>
> import "plasmapackage:/code/statelesslib.js" as StatelessLib
>

There is page in documentation 
http://qt-project.org/doc/qt-4.8/qml-variant.html
A problem is next: I need have some variable of some type like list, I 
need have access to it from QML and it should be possible to change 
items of this list (variable). A variant:

property variant myList: [] // doesn't work as expected

So, how can I do this in QML?


[Attachment #5 (text/html)]

<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">30.10.2012 16:01, Sebastian Kügler
      пишет:<br>
    </div>
    <blockquote cite="mid:4465955.G8yPA1aFdM@marvin" type="cite">
      <pre wrap="">
There, the JS code should probably be in the QML file itself, as that's the 
only place where it's used. For the shared code, you'd import:

import "plasmapackage:/code/statelesslib.js" as StatelessLib

</pre>
    </blockquote>
    <br>
    There is page in documentation
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <a href="http://qt-project.org/doc/qt-4.8/qml-variant.html">http://qt-project.org/doc/qt-4.8/qml-variant.html</a><br>
  A problem is next: I need have some variable of some type like list,
    I need have access to it from QML and it should be possible to
    change items of this list (variable). A variant:<br>
    <br>
    property variant myList: [] // doesn't work as expected<br>
    <br>
    So, how can I do this in QML?<br>
    <br>
  </body>
</html>



_______________________________________________
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