Unable to restore the ImageView ListComponent - image of the data folder

I downloaded an image in the folder data and want to show it in the listView.

In Listcomponent, I use an ImageView

"If I put its imagesource:".. /.. /.. "/ data/files/images/123.png".

The image appears correctly.

But if I try to put the same path of C++ code in the GroupDataModel, the image doesn't make.

Hi friends,

I found the solution. I hope that is useful you.

. HPP

 

#include 
#include 
#include 

using namespace bb::cascades;

class App: public QObject {
Q_OBJECT

public:
    App();

public slots:
    void onSelectionChanged(const QVariantList indexPath, bool selected);

private:
    ListView *listView;

};

. CPP

#include "app.hpp"

#include 
#include 

#include 

#include 
#include 
#include 
#include 
#include 

using namespace bb::cascades;

App::App() {
    QmlDocument *qml = QmlDocument::create("main.qml");
    AbstractPane *root = qml->createRootNode();

    GroupDataModel *model = new GroupDataModel(
            QStringList() << "firstname" << "surname" << "imagepath");
    model->setGrouping(ItemGrouping::ByFirstChar);

    listView = root->findChild("listView");

    QVariantMap person;
    person["firstname"] = "John";
    person["surname"] = "Mark";
    person["imagepath"] = "I will set on click.";
    model->insert(person);
    person["firstname"] = "Mark";
    person["surname"] = "Russie";
    person["imagepath"] = "asset:///icon.png";
    model->insert(person);

    listView->setDataModel(model);

    QObject::connect(listView,
            SIGNAL(selectionChanged(const QVariantList, bool)), this,
            SLOT(onSelectionChanged(const QVariantList, bool)));

    Application::setScene(root);
}

void App::onSelectionChanged(const QVariantList indexPath, bool selected) {    if (selected) {        if (sender()) {            GroupDataModel *stampModel =                    (GroupDataModel *) listView->dataModel();            QVariantMap map = stampModel->data(indexPath).toMap();            //map["imagepath"] = "asset:///icon.png";            map["imagepath"] = "../../../data/icon.png";            stampModel->updateItem(indexPath, map);            fprintf(stderr, "\nSelection Called");        }    }}

. QML

 

import bb.cascades 1.0

Page {
    content: Container {
        ListView {
            objectName: "listView"
            listItemComponents: [
                ListItemComponent {
                    type: "header"
                    HeaderListItem {
                        title: ListItemData
                    }
                },
                ListItemComponent {
                    type: "item"
                    StandardListItem {
                        id: root
                        title: ListItemData.firstname
                        description: ListItemData.surname
                        imageSource: ListItemData.imagepath
                    }
                }
            ]
        }
    }
}

Currently, I put a static image and a rest black. It will have the value during the click on list black image (dynamically).

Tags: BlackBerry Developers

Similar Questions

  • RDPCLIP. EXE missing startup file (system32 dir). Unable to restore the system because of missing file unspecified.

    Windows 7 (new machine, not updated). Autoruns shows this file RDPCLIP. EXE be found at startup. This file is usually located in the System32folder. Unable to restore the system of time earlier because of unspecified missing file (rdpclip.exe?). System seems to be runnuing normally except these two questions. Occasional freezes (once just by renaming the downloads folder). How can I get
    new file restored to the version of Windows 7?

    Note: CLIP.exe is in the System32 directory.

    Hi bigdome6984,

    If your machine acts as a Terminal Server, i.e. someone else connects to your computer using remote desktop, then rdpclip.exe will be loaded on your computer as part of the functionality of Server Terminal Server.

    RDSCLIP is loaded on the computer, allowing other machines to connect via Remote Desktop.

    It should be found at the following registry location:

    HKLM\SYSTEM\CurrentControlset\Control\Terminal Server\Wds\rdpwd\StartupPrograms

    Important Serious problems can occur if you modify the registry incorrectly. Therefore, make sure that you proceed with caution. For added protection, back up the registry before you edit it. Then you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click on the number below to view the article in the Microsoft Knowledge Base:

    How to back up and restore the registry in Windows
    http://support.Microsoft.com/kb/322756

    I hope this helps!

    Kind regards
    Gokul - Microsoft Support

  • Computer broke down, unable to restore the old days of CS6 Creative Ste test. Can I download this new?

    Computer broke down, unable to restore the old days of CS6 Creative Ste test. Can I download this new?

    I tried, but after running the download assistant, get the message: the application could not be installed because an application already has with this name exists at the selected location. Try to install to a different location.

    It would be even possible to go back?   Or is my test of 12 hours over for good?

    Creative Suite cleanup tool

    Adobe Download Troubleshooting Wizard

    It may not work, though... The tests are sensitive to all kinds of what they perceive as attempts of forced entry...

    Mylenium

  • Could not restore the data on the iPad

    Welcome!

    I restarted my data and the news of the iPad in Factory mode and after that I wanted to restore the data from backup to iCloud.

    My problem is very simple.

    After the nice tutorial and connection with apple ID, I have to choose 'restore data for icloud.

    That's what I do every time.

    Next step is to choose which backup I want to restore, I chose iPad Mini 20 June 2016.

    iPad show me to connect to another identifier apple to download applications and...

    He begin to calculate how long it will restore the data.

    It is the calculation for a long time and I can see the end of it. AFTER THAT I decided to stop the calculation, I chose again restore the same backup data.

    After that... it shows me that he cannot restore data from this archive.

    I did it many times, restart, save trying to itunes and nothing does.

    Dr. Fone wondershare cost a lot, and I can't buy it right now. How to restore the data, what can I do?

    FACT.

    I did it.

    I thank all of you who is interested in the topic.

    I like to say how I solved it if someone goes here in the future

  • How to restore the data on my iCloud (if I upgraded to it 50 GB a day after it was downgraded due to a credit card problem which is now fixed)?

    I got an email saying the account should be downgraded, but he had already been demoted to less than a day after the mail has been sent. I got an e-mail to alert a week before, but I forgot to correct the problem and the day of the charge, I had another but he was already at the end.

    is there a way to restore the data, or at least to understand what type of data was lost?

    Thanks in advance

    If you have lost data because you leave your obsolete data plan, so I'm afraid that you have lost it unless you have a backup somewhere.

  • How to restore the default folder of "Vidéo" in the folder owner?

    Hi all and I am currently using Vista Home Premium (language: traditional Chinese)
    I accidentally deleted the default "Video" folder in the folder permanently owner
    I used some file recovery software to restore files inside
    but the files could be restored while the default folder could not be restored
    so that applications that allow to download online videos cannot be saved in this directory
    so I would ask how to create / restore the default folder of video (with the icon that is different in the common files folder)?
    thankss a lot!

    Here is the procedure: http://www.vistax64.com/tutorials/148461-personal-user-folder-restore-missing-folder.html.

    I hope this helps.

    Good luck!

    Lorien - MCSA/MCSE/network + / has + - if this post solves your problem, please click the 'Mark as answer' or 'Useful' button at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

  • Unable to display the remote folder: the remote folder F:/wamp/www / "MYWEBSITENAME" / is not accessible or does not exist.

    In CS4, all of a sudden, I get the error "unable to display the remote folder: the remote folder F:/wamp/www /"MYWEBSITENAME"/ is not accessible or does not exist.»

    I'm in Manage Sites and test the file in the remote folder and it says "Dreamweaver connected to your web service successfully.

    I have not changed anything.  I had this once before a few years ago and just copied on the site of a new name and that fixed it, but it does not for the moment.

    Help.   Any ideas?  Thank you

    When you click the expand button in your files window, whose icon is selected in the upper part?

    The middle one is the test server (list of lightning bolt), if you try to download, you will need to switch to the remote server (standard search bullet list icon).

    If you do not have a local server running on a drive of F, and you try to put it on the test server, you will get an error saying: there is no. Is it happening?

    If you do not have a local server running on your F drive, remove the test server info, it is not necessary.

  • Restore the data file

    Hello

    Initial situation and config:

    Server: Win2k3 Sp1 32 bit
    Database: 10.2.0.4 Standard noarchivelog mode
    RMAN catalog on different server.
    Cold backup


    Therefore, I was invited to do a restore from a backup of database. What he needs, it's to restore the controlfile, spfile and a data from a backup file complete performed via RMAN. He does NOT INTEND to use them, they just want to see their restored from the backup.

    Restore the spfile and the controlfile is not a problem, and I was able to restore them to a Test directory. But since I can't restore datafile 1 to 'C:\dest', I googled how to make these.

    I came up with these, which I think who should restore a data file to a different location, but I don't know if it's okay. And since I started on the database server, I prefer to ask first.

    The value of newname to 'C:\datafiles\datafile1.dbf' to 'C:\Test\datafile1.dbf ';
    restore the data file 'C:\Test\datafile1.dbf '.

    Would this work? It must be run with the open database altering State and work and will not somehow it. If not, can someone help me here? The only thing needed, he did restore a data file just to get...

    Thanks for the tips!

    Add this

    RMAN > run {}
    value of newname for datafile 'C:\datafiles\datafile1.dbf' to 'C:\Test\datafile1.dbf ';
    restore the data file ' C:\Test\datafile1.dbf';l
    switch datafile;
    }

    It will update the control file with the new location of this data file

  • Unable to see the data as a percentage on the data form

    Hello

    I'm unable to see the data on the data form 10% but consider 0.10

    I created a few accounts hypothesis saved in the dimension of accounts with the data type %. I wonder what goes wrong?

    I have the columns 'Account' scenario, one custom dimension and lines I 'legal entity' and I expect to see the % of the form data, but without success.
    Wonder what goes wrong?

    This is version 11.1.2

    Ravi

    If it is a classic application, you will need to return to the Administration > Manage > Dimensions and click on the order of evaluation, move accounts in the left pane in the right pane and apply, try the forms.
    If it is an application of EPMA have a read of:-http://download.oracle.com/docs/cd/E17236_01/epm.1112/epma_admin/epma_data_type_eval.html

    See you soon

    John
    http://John-Goodwin.blogspot.com/

  • Planning an application migrated but unable to see the data

    Hi Experts,

    Please inform the I migrated successfully planning application; but when I open the target application server iam unable to see the data, while the demand of Sousse is to display the data.

    Are there additional steps to migrate data as well.

    Secondly, any measure of pass variables (substitution) source to application target as well.


    Thanks in advance for any help.

    Concerning
    Kumar

    You can migrate through different versions without problems, but I would try to push to have your test and production environments running exactly the same version.

    See you soon

    John
    http://John-Goodwin.blogspot.com/

  • I forgot to backup Outlook Express! However, the .dbx files are all in the data folder of Application that I have back up! How can I see what is in them to import to my chosen e-mail program?

    Original title: .dbx files

    I've updated computer laptop of my client from Windows XP to 7.  I forgot to backup Outlook Express!  However, the .dbx files are all in the data folder of Application that I have back up!  How can I see what is in them to import to my chosen e-mail program?

    This is how you would normally import into Windows Live Mail. If all goes well it will give you enough of a jump start.
     
     
     
    Copy the * ENTIRE * OE message store folder to a flash drive. (Folders.dbx must be included). Place it on the desktop or another location on the computer using WLMail.
     

    WLMail 2011/2012: folder button. Import Messages. Microsoft Outlook Express 6, and the point where it was saved.
     
     

     
     
     
     
     
     
     
     
  • Unable to restore the settings for WRT54G v. 2.2

    I have updated the firmware on my WRT54G v 2.2.  By following the instructions in "Guide Me", I have everything first to save the settings, then reset the router by pressing the reset button at the back of the router for 30 seconds.  However, when I tried to restore the settings, navigation and by opening the code.bin file saved on my desktop, I got the error message "invalid image file".  Now, I've lost my router settings, including the name of the network and secure settings.  How to restore settings, or if this is not possible how do I manually set parameters?

    Thank you

    Sam

    Look for this icon:

    In the left pane of Network and Sharing Center is a link manage wireless networks. Clicking on it leads to this dialog box:

    Remove the old network and select Add, just follow the wizard to match the settings you have on the wireless router.

  • Unable to restore the iPhone!

    I'm trying to restore my old iphone 5s so I can use the storage just for recording videos. First, I tried to restore the iphone settings. When he asks my apple ID password, I enter and then nothing happens. The password box just gray go button and stays there and I end up having to close the settings window of the thing of multitasking. I turned the phone off and tried again, but the same problem occurred. I then plugged the phone in iTunes and tried it that way, but he asked me to turn off my phone function discovery. I went into the settings on the iphone and tried to turn it off when he asked my apple ID password once again. I went in and the same problem occurred. The password box and gray buttons and I returned had to close the window of parameters with multitasking. It's kind of scary, given all that I want to do is wipe the phone of its stored in the memory and I can't do it again!

    Nevermind, I found the solution on this cool site!

    http://SmallBusiness.Chron.com/reset-iPhone-password-protected-70214.html

  • Unable to restore the quality of the colors

    I'm unable to recognize the quality of the colors through the internet because I had visited many of the sites had color quality little or not at all. I can't recognize all the details pertaining to all sites including Web pages. Everything is white. What can I do to resolve the situation?

    Hello

    Are you facing this problem only in internet explore?

    Try to configure your 32-bit color quality (click on start-> settings-> Control Panel-> display-> settings). If you don't see a 16 or 32-bit, looking for your display drivers - click on start-> settings-> Control Panel-> system-> hardware-> Device Manager = check for any yellow exclamation next to the adapter chart or screen, if yes, you will need to install your display drivers.

    If you encounter this problem only with internet Explorer check colors in internet options explore-> open internet Explorer-> tools-> Internet options-> color-> only select 'use windows colors'-> Ok.

    I hope this helps.

  • Unable to restore the previous version of Google Chrome on Windows 7

    I wanted to restore the previous version of google chrome. During this process in one step "preparing to copy" you can see here

    http://S32.postimg.org/s05lc8oc5/copy.PNG

    then I got the following message http://s32.postimg.org/9ufrvpik5/paste.png

    I hope you can see the pictures. If this isn't the case, please tell me.

    Help, please.

    Advanced thanks.

    Hello Zoya,

    I would like to know some information about the problem so that we can help you better.

    The current version of Google chrome causes any question? If so, what exactly is the problem?

    Thank you for details on the issue.

    I also know that the inconvenience that you are experiencing due to problem of Google Chrome. I will definitely help you.

    This problem can occur because corrupt Google Chrome files and settings.

    I suggest you to uninstall Google Chrome completely and then reinstall the previous version.

    To uninstall, please see this article:
    Reference:
    Uninstall Google Chrome - Chrome help
    https://support.Google.com/chrome/answer/95319?hl=en

    To reinstall the previous version of Google Chrome, please see this link:
    http://productforums.Google.com/d/topic/chrome/JCXuvM7Dfcg

    I hope this information helps.

    Please let us know if you need more help.

    Thank you

  • Cannot restore the backup folder

    I had a problem with my laptop HDD (bad sectors) and I had to format it.
    Before formatting it, I saved the profile folder in my external HARD drive.
    I tried to restore the profile but it does not work. It only contains the folder "Cache" (12 MB), "mozilla-media-cache" folder (0 KB), folder "OfflineCache" (11KO), folder "startupCache" (1.06 MB), folder "thumbnails" (50 KB), urlclassifier3.sqlite and urlclassifier.pset
    I can't find cookies.sqlite, formhistory.sqlite, etc..
    Is it possible to restore all of the folder "cache" or in any other way? My hard drive now low level formatting, in order to restore the old data is impossible.

    Thank you in advance.
    

    Unfortunately, this isn't your profile folder. You saved % LocalAppData%\... but instead, you must have backed up % AppData%\...

    Disk cache contains files of web site such as pages, images, and scripts. It is practically useless for the purposes of restoring a backup.

    I highly recommend to keep good backups of your data somewhere other than the player in question. Bad sectors are not a good sign and may indicate larger problems to come.

Maybe you are looking for