QtQuick.XmlListModel in android don't work qt5.1.1



  • import QtQuick.XmlListModel 2.0 - is make clean screen in my program on android, on pc it's fine, Here is the question:
    in qt 5.2 it will work?
    functional is similar to this video https://www.youtube.com/watch?v=_6_F6Kpjd-Q (work with flickr api)
    P.S. Sorry for my bad English.


  • Moderators

    Try it out, t 5.2 beta is already available.



  • i can't deploy it,there are many errors:
    /home/serg/build-pixwiper-gui-Android_for_armeabi_v7a_GCC_4_8_Qt_5_2_0-Debug/android/gen/org/qtproject/example/pixwiper-gui/BuildConfig.java:2: error: error: ';' expected

    here is the code:
    /** Automatically generated file. DO NOT MODIFY */
    package org.qtproject.example.pixwiper-gui;

    public final class BuildConfig {
    public final static boolean DEBUG = true;
    }

    And another error:
    /home/serg/build-pixwiper-gui-Android_for_armeabi_v7a_GCC_4_8_Qt_5_2_0-Debug/android/gen/org/qtproject/example/pixwiper-gui/R.java:8: error: error: ';' expected

    code:
    /* AUTO-GENERATED FILE. DO NOT MODIFY.

    • This class was automatically generated by the
    • aapt tool from the resource data it found. It
    • should not be modified by hand.
      */

    package org.qtproject.example.pixwiper-gui;

    public final class R {
    public static final class array {
    public static final int bundled_in_assets=0x7f030004;
    public static final int bundled_in_lib=0x7f030003;
    /** The following is handled automatically by the deployment tool. It should
    not be edited manually.
    */
    public static final int bundled_libs=0x7f030001;
    public static final int qt_libs=0x7f030002;
    public static final int qt_sources=0x7f030000;
    }
    public static final class attr {
    }
    public static final class layout {
    public static final int splash=0x7f020000;
    }
    public static final class string {
    public static final int app_lib_name=0x7f040002;
    public static final int app_name=0x7f040001;
    public static final int fatal_error_msg=0x7f040008;
    public static final int init_classes=0x7f040005;
    public static final int local_jars=0x7f040004;
    public static final int local_libs=0x7f040003;
    public static final int ministro_needed_msg=0x7f040007;
    public static final int ministro_not_found_msg=0x7f040006;
    public static final int repository=0x7f040000;
    }
    }

    i'm not good in java...



  • I have a program that uses XmlListModel and it worked fine for me on Android with Qt 5.1.1. Maybe if you posted the code and the errors you get? Though I don't know of how much help I can be since I don't have the tablet anymore.



  • my code use http://... for list model
    XmlListModel{
    id: flickerModel
    source: "http://api.flickr.com/services/feeds/photos_public.gne?format=rss2&tags=Faces"
    query: "/rss/channel/item"
    namespaceDeclarations: "declare namespace media="http://search.yahoo.com/mrss/";"
    XmlRole{name:"title";query:"title/string()"}
    XmlRole{name:"source";query:"media:thumbnail/@url/string()"}
    }
    this code working great on the desktop but it is not working on my android, even if i just make import that module (i use linux 64)
    if comment model code and import and just replace that with rectangles it's work



  • Did you get this as the error:

    could not load library "libQt5XmlPatterns.so" needed by "libqmlxmllistmodelplugin.so"; ?

    If so, you need to click on Projects on the left side of Qt Creator and then choose the Android build's Run section. Then in Package configurations click on Details to expand it. Under "Required Qt libraries" make sure you check the libraries that are needed - most likely Qt5XmlPatterns and Qt5Xml.



  • oh thanks it works


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.