XmlDataModel and qml: model read of data directory

Hello

I am building a partially written application with qml.

I made a page with a ListView and XmlDataModel qml.

All works if the xmldatamodel read the source of goods .xml file...

But if I change the XML source to point to a file in the data directory, the journal report that it cannot access the file...

Why?

The file is present, and the content seems OK.

Should I need to enable something?

Thank you

Okay, that was a path problem... the source path: '.. '. /.. /.. / data / yourmeallist.xml ' was wrong. "

I knew not how to pass the good reference to the application data directory... so the solution I found, it's pass the path of the file to like a ContextProperty QML... Like this:

QDeclarativePropertyMap * propertyMap = newQDeclarativePropertyMap;

propertyMap-> insert ("XMLPATH", QVariant (QString (QDir::homePath() + "/ yourmeallist.xml")));

_qml-> setContextProperty ("_propertyMap", propertyMap);

and that in qml read this property

....

{To ListView

dataModel: {XmlDataModel}

Source: _propertyMap.XMLPATH

}

...

Not the best solution... but it works

Tags: BlackBerry Developers

Similar Questions

  • I'm reading the data (speed rate and flow) of a table and it plot in a graph.

    I'm reading the data (speed rate and flow) of a table and it plot in a graph. I need to draw two values of l/min (speed) to the same speed. How can I do using a loop for?

    There is no need actually to use a loop FOR this. And using a graphic waveform isn't the type of field for this, for a waveform you a (Start), the dT T0 (greatness not) and table D (Data), this isn't what you want unless you know precisely the measure will take place according to an orderly disposal, you'd want a xy chart so that you can trace the measures where they occur in the axes X and Y of preference.

  • How to read the date and time of a file by labview information

    How to read the date and time of a file by labview information? for example, time created and updated time.

    The similar question had already spoken here (this is the old thread but still seems topical):

    http://forums.NI.com/T5/LabVIEW/file-date-created/TD-p/109836

  • use the queue and event to read data from two series mean

    Hi all

    I'm reading the data of two serial port using QUEUE AND EVENT but not sccusess. can someone help me?

    I use LABVIEW 2011.

    att my project.

    regrads.

    You stop the second for loop using cluster of error which means that your upper and lower loop stops when you press exit but not the one in the middle. In theory, you should send a queue for loops below when you press the exit button and also make sure that you shoot hunting all queues before closing everything.

  • problem with the creation of a folder and a file, read in the header and data

    I want to create a new folder named by time and then generate a file inside this folder txt: reads first header information and then reads the data, but the problem is that if there is this folder, the header appear in the file, if this folder is not existed, the header will not appear in the txt file.

    Thanks for your help.

    Hi Junniji,

    Check the attached vi. I did what Bob was trying to explain in the vi. I documented the steps described in the block diagram. Take a look. I had few comments on your code as well. Always try to connect the wires of the error when coding and try to keep the neat code so that its easy to debug and understand the flow (even if it's a test code ).

    A Subvi missing in vi who sent you there. I hope that you will have in your pc

    Kind regards
    Amine31

    (Give glory to good answers, mark it as a Solution If your problem has been solved )

  • If it's possible... desktop PC, I want to export data using expdp and dumpfile goes to his local directory?

    Scanario

    1 Server Machine (database software)

    2 oracle installed Client workstation

    If it's possible... desktop PC, I want to export data using expdp and dumpfile goes to his local directory?

    Rajesh

    Hello

    You can use this method

    http://dbaharrison.blogspot.de/2013/05/expdp-creating-file-on-my-local-machine.html

    But it depends on having you another instance on your workstation also.

    Otherwise, you will need to sort the database drive will appear on the desktop or vice versa using nfs/samba etc.

    See you soon,.

    Rich

  • How to read the data of BLOB and save to the file system

    Hi friends.

    I have called DEMO table there image stored as a BLOB. now my requirement is to know how to read the data of BLOB and saved in the file system. is there a procedure
    to read the blob object and stored in the file system. pls suggest me with an example.
    Thank you

    HI - don't know what version you have, but have a read through this:

    http://www.Oracle-base.com/articles/9i/ExportBlob9i.php

    Hoek link is to import the blobs in the db, it is export, to a file.

  • PXI-5122 and PXI-6259 read 2 channels simultaneously

    There is a single PXI-5122 digitizer card and a PXI-6259 DAQ card in our PXI system, we use Labview and TestStand (model Batch) to test the multiplication Board simultaneously, sometimes up to 8 boards are tested. We have some problems, such as the results of the tests is not reliable and sometimes blocking of Labview. Everything works fine when test single board. Thus, we feel that multiply causing this problem of acquisition of string data. It's great, if someone has the same problem and we can share the knowledge. My question is as follows:

    1. If two channels have been configured, read the two channel simultaneous cause blocking of the system or data damaged?

    "lu niScope WDT.vi" is reentrant, we can use two Subvi to call the "niScope Read WDT.vi' access the two channels simultaneously.

    2. If we set up a channel in another channel is reading the data, this situation will cause the search system or corrupt data.

    Concerning

    Samuel

    Hi Samuel,.

    You shouldn't have any difficulty to read several channels on your 5122 or between your 5122 and your 6259. You receive an error message when your test is blocked? What happens when your test is not reliable? Are you incorrect data and if so what is the data vs expected data acquired? You should be able to set both your channels in a single task, which would be using a read niScope WDT.vi to be used by the device. You are working from example or have you developed your own code? What version of the driver NOR Scope and NI-DAQmx driver do you use? You can find the driver version number in the measurement and Automation Explorer under the software section.

    What kind of test are you running? Your PXI chassis is controlled by a computer or by an on-board controller? Evolution of the rate of acquisition has an effect on your program?

  • Satellite P500/01R reads the data, but cannot write data on CD files

    I recently bought a laptop Satellite P500/01R. I am able to read a data CD, but can't write data on CD files. The CD is read/write.

    Any ideas?

    Hello

    Have you tried different burning software?
    I m using Nero and in my opinion one of the apps better combustion.
    Here, I can choose between CD, DVD, DL or Blueray (only possible if the CD/DVD drive also supports this).

    Have you also checked diffΘrents CDs from different manufacturers?
    You should do this since not all disks are 100% compatible.
    I had several problems with different CD or DVD in most of the cases it was a compatibility issue, I tried TDK and this kind of drive is compatible with my CD/DVD drive
    I m using the standard of R.

  • Read more data 1 byte of visa

    Hi, when I use VISA to read more data of 1 byte, only the first table got the data, but I want to separate data from 40-bit to 5 tables. Does someone know how to separate data in the tables? Thank you for the reply!

    Your problem is the ASCII conversion attempt.  As I said before, you have raw binary data.  Therefore do not touch anything that deals with ASCII.  All you have to do is take your byte array and convert each element in an array of Booleans.

  • Read the data in the first column selected in a multicolumn listbox

    When a line is selected in a ListBox multicolumn (1 point), how can I go on reading the data in the first column?

    The listbox multicolumn itself is the digital picture data type. If you have allowed only 1 point selection and selection mode select any row, it returns the line number. The property node 'Element names' to return a table 2d-chains of the elements in your Inbox. The index of the row to the value of the listbox and column 0. See code attached.

  • reads the data when I select run

    When I insist on running my program reads the data from the meter power... when I'm not it gives me an error. I tried to put right waiting them etc and nothing seems to be set. Also, when I take the vi that read data from the electricity meter, the code runs much faster. I don't know if this has to do with global variables or what, but I just change a code supplied with this unit and it included global variables. I tried not to play with those yet. Anyway, if someone sees something that would eventually cure this problem please let me know. Thank you.


  • How to read the date of the day of the day of the year?

    I want to put 30 days for the test of endurance for the application of the components. the user will have the current value of 30 days with specify them the end of the day.

    I saw that the "seconds to Date/Time.vi" sure I checked the day of the year. If I can use this day of the year, I can add + 30 read 30 date.

    Barros,

    What I gave was the answer you were looking for originally because I believe.  You will not just be able to read the date in a coherent way and then add 30.  You can either use the function Get time in seconds or a few varaint it and then add the offset you want (you could use the get a Date/time string and enter the date directly, but this digital conversion which will be useful in the monitoring of the time elapsed will be much more difficult than what I provided only).  If you want to stop the test, simply to keep track of the amount of time the test is in pause and extension at the time where that amount.

    Cheers, Matt

  • Reading large data using the database connectivity

    Hello

    I use the Labview database connectivity toolkit to connect to my database sqlitev3 (I'm using ODBC). I just have to connect to the database (using the block of open_connection) and read all the values inside (using the select_data block). The problem is that my database is huge (about 2 GB), and I get this error:

    . VI NI_Database_API.lvlib:Rec FETCH Recordset Data (R)-> NI_Database_API.lvlibB Tools Select Data.vi-> real_web.vi-> real_web.vi.ProxyCallerADO error: 0x8007000E Exception occurred in provider: not enough memory is available to complete this operation. in .vi NI_Database_API.lvlib:Rec Fetch Recordset Data (R)-> NI_Database_API.lvlibB Tools Select Data.vi-> real_web.vi-> real_web.vi.ProxyCaller

    What should I do? It seems that he reads the data in the memory and it doesn't have enough space for it. When I read the data I want to write to a file.

    Read it in pieces. Write each piece to the file, and then repeat with the next segment. Try to read and process all data in one shot is not very practical and you found out will not work.

  • Reading GPS data from a cRIO

    Hello world

    I use a module in series or with cRIO 9870 9014. I have need to acquire analog data with the GPS data and lang + long for each data point.

    I am able to get to the host vi gps data, but I am confused about the acquisition rate. I was curious and place a control on front panel to watch the gps in my RT vi data and I see a lot of spaces. (photos attached). I watched a lot of good examples on gps with the readers of visa, but since I'm on a cRIO with a TCP connection, I don't know how to process the data of succession on the controller.

    Can anyone help me please with ideas to use the module straight series.

    Thank you

    Tamanna

    Since it is a serial connection, you need to be constantly read the 9870 on the FPGA.  Even if your gps only updates once a second, that "update" has strings of unsigned 8 bit integers representing all of your characters - each read one of these U8s, seize only if you read at 1 Hz, will NOT correct data.

    So... Read on the FPGA continuous, faster better and passing in a FIFO to pass off to the host so that you can decipher your data. You may need to adjust timeouts on i/o reads.  Definitely take a look at the examples in the example for communication finder series with this module.

    And... as a diagnosis... you should be able to do this easily plug into the port series to your controller and use the controls VISA ON THE HOST RT - ethernet connection has nothing to do with it.

    For diagnosis, the indicators more the better. Let me know if you more specific issues.

Maybe you are looking for