Fill ListView using the C++ model

Hello

Sorry to bother, I guess my question must be pretty basic, but I'm new to bb10 SDK,

What I intend to do is to show in a listview items, I calculated in C++. (In C++, because the logic for calculating them was quite complex)

There, in the QT doc, you have exactly what I dream of:

https://Qt-project.org/doc/Qt-5.1/QtQuick/QtQuick-modelviewsdata-cppmodels.html

Unfortunately, I have several questions:

-ownership model, seems to exist. But I guess we use dataModel in our context, right?

-J' I also need to get the declarative context of the QmlDocument which I think is correct.

-the delegate property also doesn't seem to exist, but I understand that I must use instead ListItemComponents ( http://developer.blackberry.com/native/reference/cascades/bb__cascades__listitemcomponent.html)

But I'm still confused on how I should provide the data for the list view.

Now, when I expose my QList of DataObject, as described in the Doc of QT and which gives as data to the dataModel is told that he cannot "affect QDeclarativeListReference to bb::cascades:ataModel."

So I guess I have to use a QListDataModel instead of use a Qlist <>, or?

Well, any help in pointing me to the right documentation would be very appreciated!

Thank you

fill us our data model in c ++ as well.

For this, we use a Q_INVOKABLE method that gets the listview as a parameter.

The ListView itself is created in QML.

ListView* listView = dynamic_cast(listViewParameter);
GroupDataModel* model = dynamic_cast(listView->dataModel()); if (model) {        model->clear();    } else {        model = new GroupDataModel(QStringList() << "sortParameter");        model->setGrouping(ItemGrouping::ByFullValue);        listView->setDataModel(model);    }//calculate stuffmodel->insertList(stuff);

Tags: BlackBerry Developers

Similar Questions

  • Determinations of web OPA shows white screen when you use the data model

    Hello

    I use Oracle Policy Modeling 10.5.5.40 on windows 7. I use embedded apache tomcat to test.

    I have started a new project, added a simple rule:

    [b1] the parent is eligible for the benefits of compassion so

    [b2] parent has a child

    I chose 'Build and Run' selected web determinations, work very well.

    When I added a data model, created two entities, parent-child, and the child is contained in the parent as to-many, then ran the project, it won't work any more. The section that says:

    =========

    is absent.

    I also tried to open an example of "MembershipDemo" that comes with OPM, same problem.

    Any ideas how can I fix?

    Thank you very much

    Looks like you have probably changed the Boolean value "the parent is eligible for compassionate care benefits" from the global to the parent. This means that is no longer a goal because it is a single Boolean value that can be determined, it is now a Boolean value for each parent in the rule template.

    The goal that presents itself as the first screen in your interview display all the high-level objectives - that is, all objectives at the global level.

    Some possible solutions to get a goal for your interview may are:

    1. If you try to determine cbb for 1 single parent, then you probably shouldn't introduce a parent entity, use the global as a parent

    2 introduce a global "all determined the eligibility of the BCC of parents" trying to see if "the parent is eligible for compassionate care benefits" is known to all parents

    3 decide which is the highest level (s) for your interview and to introduce these Boolean values to the global level.

  • How to import in different Oracle schemas using the same model? Physical schema is different every time, so, how is this a handles that?

    Experts of the ODI,

    I use ODI 11.1.1.7.0 and transfer data to an Oracle database. So far, everything is OK, but...

    I want to reuse my current interfaces for import into different schemas in the same database.

    At the moment all the table data were imported into a single scheme under topology/Physical Architecture / Oracle / Data Server / physical schema I chose the pattern and check the "default."

    If I import now to other patterns (300 different ones), how should I configure the physical schema values for:

    Schema (schema)

    Scheme (scheme of work)

    Default checkbox? (I assume must be deselected)

    On a quick test, I left schema & schema of blank and disabled by default check box. Two interfaces work (one per table), but the third failed (my guess is the way in which the model was reverse engineering has to do with it, but don't know how to fight against it) I know how to debone a model, but if I use a pattern to do the other schemes do not work because ODI will give me a table not found. How do I work around this problem. Here is an example of the error I get after removing the default schema of the physical schema definition.

    ODI-1226: step CON_TY fails after 1 attempt.

    ODI-1240: Flow CON_TY fails during an operation of integration. This flow of charge table target CON_TY.

    ODI-1228: task failed CON_TY (integration) on the ORACLE connection signal target.

    Caused by: java.sql.BatchUpdateException: ORA-00942: table or view does not exist

    Your help is appreciated. Thank you.

    Here's how, to work around the problem of schema change the mask object Local of the physical schema on the server target %SCHEMA.%O OBJECT to % OBJECT in this way the schema is not part of the SQL at all.

    And these are the values that I use in the physical schema definition

    Schema (schema) - undefined

    Scheme (scheme of work) - undefined

    Check box default - select

    Given each user has permissions for objects it is clean and it doesn't have the schema name to reference the object, it works very well.

  • JDBC module when you use the domain model

    Hi, I set up a wlp field and has a few modules JDBC under config/jdbc directory. Then, I created a domain model using this area. I am using WLST to create the new domain using this model. However for jdbc modules, I need to change the user name and password for each new domain. Where can I change and how? Thank you

    You can create by using for example,

    print 'CREATE DOMAIN';
    readTemplate(domaintemplate);
    setOption('DomainName', domainname);
    setOption('OverwriteDomain', 'true');
    setOption('ServerStartMode', 'prod');
    cd('/Security/base_domain/User/weblogic');
    cmo.setName(adminusername);
    cmo.setUserPassword(adminpassword);
    cd('/');
    writeDomain(domaindirectory);
    

    After that, you can start the administration server,

    startServer(adminservername, domainname, adminserverurl, adminusername, adminpassword, domaindirectory);
    

    You can then use

    print 'START EDIT MODE';
    edit();
    startEdit();
    
    print 'Lookup resource'
    datasource = cmo.lookupJDBCSystemResource('DataSourceName');
    resource = datasource.getJDBCResource();
    driverParams = resource.getJDBCDriverParams();
    driverParams.setPassword('password');
    driverProperties = driverParams.getProperties();
    driverProperties.createProperty('user');
    userProperty = driverProperties.lookupProperty('user');
    userProperty.setValue('username');
    

    http://middlewaremagic.com/WebLogic/?p=7795

  • All Adobe products adjust vitality using the brush model?

    Adobe Photoshop Express for Windows 8 (bought in the App Store 8) has some major effects of dynamism.  I use these with digital paintings, to enhance the color saturation in the horizons.   Unfortunately, this is a very simplistic software and the effects that it provides must be applied to the entire image.   Adobe makes any product that would allow me to change the dynamism of a digital image with a brush of adjustable diameter so that I could carefully select where the effect is applied to?

    Learn about layer masks in Photoshop or elements - you can apply any effect to the areas you want with them.

  • Given multiple options to get filled by using the SQL query

    I have the following data in the table.

    I want to fill the column custid with a few conditions.

    (1) If a client is on a loan account as custid must get filled. (for example: 124)
    (2) if the multiples are on a single loan account then

    (a) if one of the clients has rolename = "w1" then it must be filled. (for example: 125)
    (b) If several customers a rolename = "w1" then custid minimum should get populated(eg:123)
    (c) If none of the clients has rolename = "w1" then custid minimum should get populated(eg:126)




    LOANNO ROLENAME CUSTID
    123 X 1
    123 2 W1
    123 3 W1
    124 Y 4
    5 125
    125 6 W1
    7 126
    8 126
    9 126


    And my output looks like

    LOANNO ROLENAME CUSTID
    123 2 W1
    124 Y 4
    125 6 W1
    7 126


    I tried the departure from

    SELECT ACCNO, ROLENAME, MIN (CUSTID)
    FROM TABLENAME
    ACCNO GROUP, ROLENAME
    HAVING ROLENAME = "W1".

    How to all conditions.
    Could you please help in this?
    I tried again on that.

    Thanks in advance.

    Concerning
    KVB

    Hello

    I see now: you do not want the Group BY accno both rolename; that would produce a line of output for each combination separate accno / rolename. You want only one line of output for each separate accno.
    One way to do that is a Query of Top - N , like this:

    WITH     got_r_num     AS
    (
         SELECT     accno, rolename, custid
         ,     ROW_NUMBER () OVER ( PARTITION BY  accno
                                   ORDER BY          CASE
                                                 WHEN  rolename = 'W1'
                                         THEN  1
                                         ELSE  2
                                     END
                           )    AS r_num
         FROM    table1
    )
    SELECT       accno, rolename, custid
    FROM       got_r_num
    WHERE       r_num     = 1
    ;
    

    You could do it with GROUP BY, but it's messy:

    SELECT    accno
    ,       MIN (rolename) KEEP ( DENSE_RANK
                                           FIRST
                              ORDER BY  CASE
                                             WHEN  rolename = 'W1'
                                   THEN  1
                                   ELSE  2
                               END
                        ,         custid
                         )         AS display_rolename
    ,       MIN (custid)   KEEP ( DENSE_RANK
                                        FIRST
                           ORDER BY  CASE
                                             WHEN  rolename = 'W1'
                                   THEN  1
                                   ELSE  2
                               END
                         )         AS display_custid
    FROM       table1
    GROUP BY  accno
    ;
    
  • When I export to ibooks ePub 2.4 author using the ePub model I lose features viewing in iBooks. I can't change the color of the background in sepia or night view and me can't change fonts.  The only option I have is zoom the text more great.

    OS X Yosemite

    10.10.5 version

    iMac 27 inch

    iBooks author 2.4

    iBooks 1.2

    Apple tells you about the differences between the ibooks and EPUB here:

    About ePub files created with author - Support Apple iBooks

  • Pages export to Word using the model of NEWSLETTER, issue 1 of page spacing

    QUESTION: Anyone know if model NEWSLETTER (and or Museum Brochure) correctly export to .docx and how delete images or change the text boxes using these models so that I am still able to export properly?

    I used the NEWSLETTER model, whose Pages can export to .docx and then import to .docx (I don't know if that Word can do, but Pages indicates it would be).

    Problem: after the header of the newsletter, I removed the photo and have floating only the areas of text underneath.  I have two pages, the 2nd page export perfect (a page break separates it from the first).  On the first page, there are 12 small boxes in two columns under the heading who generously and easily fit on the first page.  It is not unlike the model I have, however, but with no photos.  I've seen many templates use these 'boxes' in support of the columns of text on a page, I don't think the floating box would be a problem.  However, I like the wish of floating boxes to learn how to use them so that they "work".

    I saw immediately that the text boxes, I added, when export and imported .docx, lose their place and float under the heading (NEWSLETTER) (superimposed text, bad page layout).

    I noticed the paragraph (carriage return, Enter) symbols, while I moved around text boxes, had become interlaced between the boxes, but not all - 1/2 at the bottom of page.  I then noticed that attempt to remove the superfluous paragraph runs in .pages (after repositioning all the boxes), but aggravated .docx, also the Pages do not leave even to remove the first symbol (it mystifies me, because the models do not appear to use paragraph at all except inside the floating boxes).

    Finally, I added enough symbols paragraph so that there was a conflict between each text box, but not as much as Word decide to add a blank page.  I had to make sure the columns are too wide - they should be 1/4 "part we will tell.  THAT APPEARED TO WORK.  Pages exported and imported it point by point I was happy.

    But when my Advisor job achieved and open in Word (the one for Windows 7), the SAME problem, I had before setting the transport returns appeared: the two decoders or four are overlapping the title, and set the person must have inserted transport returns before the first text box to move it all down (which seemed to work - but failed as an export and no not to use practice later).  'good work '.  Fortunately, I also have attatched a PDF export, however the person had asked to change their PLU using high government dell.

    QUESTION: Anyone know if model NEWSLETTER (and or Museum Brochure) correctly export to .docx and how delete images or change the text boxes using these models so that I am still able to export properly?

    Thank you hope that your next print job loose its staples.

    Well, we have said for years in this community if you want stressless, architecture native document exchange with Windows Word users that you need to use the most recent Word available on the Mac.

    Pages is not a clone of Word, and Apple does not guarantee that the open translation process / export from/to the architecture of document Word will remain faithful to the original of the document formatted.

    In response to your questions:

    1. If you have document objects in a model with x on their border, and then the object is locked. You visit the tab Pages to reorganize v5, and downstairs you can unlock these objects for further editing, or deletion.
    2. It is advice that we can give here will make sure Pages exports specifically to the word he already did not. The logic of translation is connected to demand, and it is the price of roulette.
    3. Continue the first paragraph.
  • First group title below displays under the column headers using the model 23 classic report with the help of repeat titles on break

    Hello

    I am migrating an application from 3 APEX APEX 4.2 on a thing I noticed with the classic reports when I put them in the model 23, it's that the first section break has break notch under the headings of columns for this section of line while the remaining lines properly have it display above the headers on the subsequent sections of group.


    When I look at firebug code I saw that all the tables but the first, the break line is included in the last line of the previous table, so I can see how it did not work for the holidays since.

    I have tow questions.

    1. is it really intentional because it seems not terribly elegant and my users to zero immediately above as a perceived bug.

    2. is there a reasonable job around always use headers repeat on break? I have multiple reports on the same page in places so switch to interactive reports is not a quick fix for me in this case.

    Example of a question can be seen at apex.oracle.com at home

    Thank you

    Brad

    Roadling wrote:

    Hello

    I am migrating an application from 3 APEX APEX 4.2 on a thing I noticed with the classic reports when I put them in the model 23, it's that the first section break has break notch under the headings of columns for this section of line while the remaining lines properly have it display above the headers on the subsequent sections of group.

    1. is it really intentional because it seems not terribly elegant and my users to zero immediately above as a perceived bug.

    The Standard report template definition in issue 23 contains thead and tbody elements:

    Before the column header

    
    

    Column title template

    #COLUMN_HEADER#
    

    After the title column

    
    
    

    After the lines

    
    
    
    
    
    
    #PAGINATION#
    
    
    
    

    This is intentional, the best practice for marking up HTML tables. What is not expected is the problem that arises when this model is used with the break of repeat titles on break formatting option. The repeated headings result table consisting of soup of tags containing several poorly constructed tbody and thead, which is not valid elements.

    2. is there a reasonable job around always use headers repeat on break? I have multiple reports on the same page in places so switch to interactive reports is not a quick fix for me in this case.

    Create a copy of the report model Standard in Standard (break formatting) for use with reports of the break, remove the thead and tbody definitions of template tags and the breakdown of the reports to use the new model of change. (Or, if you use mainly break reports using the Standard template, keep the tags in the copy and remove them from the original in order to minimize the number of reports, you need to change.)

    Personally, I would create a report model of line custom to break complex reports in order to be able to have complete control over the structure and presentation.

  • Need to use values from the first query in other queris to the data model

    Hello
    Here is my requirement-

    I use the data model to run multiple queries. The first query, I get 10 records. Now, I want to use these 10 records in the second query to get my final result. I am not able to use the sub query as the two motions are quite long and complex.

    Select distinct Bishop of emp

    Select empno, emp where Bishop in (: Bishop)

    I can't use: Bishop because it will give only the last value stored at Archbishop. Is it possible to be able to use all the values from the first query in the second query using the data model?

    Hello

    Are you sure that you have your "dataStructure" configured correctly? Try this simple example:

                                                                          
    

    Hope this helps

    Andy

  • Equivalent of PreUUTLoop for the parallel model

    I am building a test sequence to test two DUT in parallel, on a station where some of the facilities will be shared.  I want to initialize all the equipment BEFORE the start of the exectuion of tests and even more specifically before the individual PreUUT of each execution taken step.

    It was logical to my approach "Initialize hardware" in the "PreUUTLoop" sequence reminder in an original design that used the sequential model. It must only be done once.

    Is there a reminder of similar sequence in the parallel model in which I can move step 'initialize hardware "?

    I put in the SequenceFileLoad callback.

  • Hello computer wizards! I need to upgrade the RAM 480 MB to 1 GB so I can use the transcription of Dragon software!

    Got the disc of the shade and I used the previous model from Dragon (10) on this machine - worked fine - but the 11 Dragon at all (bluetooth wireless) bells and whistles. And now I find that I have to upgrade to 1 Gig RAM or send the Dragon 11 back. An operation is dangerous it? And who should I trust to do such a thing? I could lose a vital part in the process?

    Is this useful? I love my old machine... He argued until... but still...

    I got this Gig Presario 40 for 5 years and more now with XP on it. There still 11.5 concerts left! Daavee helped me with some diabolical security issues last year, and I hope someone here can advise me on the best way to go.

    Thank you very much

    Valerie

    Thanks for the close out of the thread, even if a little late and congratulations on your new computer.

    I assume that you now have Windows 7...

    For any further consultation (and anyone who falls in your question): add more RAM is usually quite simple and well within the competence of someone who isn't a complete technophobe.  In addition to getting the right parts (which can almost always be determined by a brief visit to the 'system' to http://www.crucial.com/scanner) there are some precautions that can easily be explained if necessary (for example, measures to prevent the damage caused by static electricity, how to avoid damaging the computer or the new RAM with the installation and the removal of parts and ensure that the new RAM is put into the correct slots).

    In addition, the "40 GB" that you mentioned is, of course, the space on your hard disk, which should not be confused with 'memory' (aka RAM).

  • Developer reports 11g fails when opening the data model view

    Hello

    I see this on one of my client sites.

    They have just upgraded to 11.1.2.2.0 suite of developer on Windows 7.  The works of developer of fine forms, reports developer opens the report ok, but when you try to use the data model view, the program crashes and closes.

    I checked the usual suspects such as the REPORTS_TMP registry variable.

    This happens when trying to create a whole new report also, therefore seems to be an installation problem.

    Saw someone else this please?

    Tony

    Hello Tony,.

    Then, check this box.

    Hamid

  • Ready for character animation... To start from scratch or use the template?

    Hey everybody!

    First of all... I'm so amazed with character animation. Good job Adobe!

    I have a children's music group called 'Panda Party' https://www.youtube.com/watch?v=j1HDW1Q-H-c

    Up to now, everything has been based costume, but now with the amazing launch of animation character I can now start to do complete cartoons.

    I have just completed all the elements separated from the parts of the body, forms of mouth, eye flashes etc one of the character 'Penny Panda' ready to make my first cartoon character. I used the basic model of puppet character animation in photoshop and began to move the layers where they should be. Unfortunately, even if the head has been correct at first... as I moved forward a lot of elements was incorrect, eyes were not suite and locations of shape and the body of the original puppet eyes threw a lot!

    With something like this you would tell completely from scratch, and rename elements of an original rather than a puppet template file? And if so is it as simple as just the final layered psd correctly named imported puppet and animation character will be ready?

    Or y at - it another puppet model more suited to this type of bodywork that I start with?

    Thank you Adobe! Can't wait to start rolling on our news with the new characters

    KOB

    penny panda.jpg

    Hi Kob... If your character does not have the views of profile/quarter for the head, you had to be able to use the model of default puppet (new puppet in Photoshop / Illustrator), but if you have multiple views, Wendigo as described Jerry would be a good idea to follow. Alternatively, you can boot from your original artwork and group/rename layers as needed.

    When you use any existing puppet (Wendigo, model by default, etc.) model, you want to make sure to spend all handles for Fixed/Dangle/etc. to suitable locations based on your artwork, so that they are not above the empty parts of the document.

    If you are still experiencing difficulties to achieve usable results, feel free to post a screenshot of your work layer hierarchy or a shareable link to your work file to look at us.

    Thank you.

  • How to get the source code of the UIShell model

    Hello

    We use the UiShell model in our project. The version of the UIShell model is the one coming with JDeveloper 11.1.1.6.
    We need the source code for this particular version to customize.

    My questions are:

    1. where to find the source code for this particular version (No newer or older)
    2 how get it (do we need to sign anything, for example?)

    Thank you

    Hello

    the SR may be presented by any person in your company who has a metalink account.
    Only the NDA must be signed by the person who has the legal responsibility to do so.

    concerning
    Peter

Maybe you are looking for

  • Play sound but no display

    I've been trying to start my Mac but with no joy. When I try to run the drivers and the fans start and I am receving departure Bing, but it has not shown display. I tried to unplug and restart but still no joy. Any help would be great.

  • Error code: 0X800706BE (cannot install KB982381)

    Security update does not load. KB982381. How can I get it to load

  • 100 Pro discount

    Canon still offers the discount of $200.00 for the Pro 100?

  • Problem with my Bank to scan

    I'm used to be able to scan the controls to my Bank for the deposit.  Now, I get a message that I have capablility duplex and I should check with HP.  It does not analyze my site of the Bank.   I am able to analyze other documents PDF or JPG... and s

  • Double-tag becomes triple-tag me3600 to ASR91K

    Hello I installed a Pseudo-fil between a port on a x-me3600 to an ASR91K frames received on the me3600 are QinQ (101.25 for example) these images are then routed via a xconnect to an ASR91K where I drop them on an interface (which I then 'handbag' to