Help with C++ file path

Must do something stupid here:

QFile file("asset:///images/test.gif");

if(file.exists()) {qDebug("file exists");} else {qDebug("no file there");}

I always get 'no file' and tried:

  • Asset:///images/test.gif
  • Asset/images/test.gif
  • /Asset/images/test.gif
  • /Accounts/1000/APPDATA/com.example.ClipboardTest.testDev_ipboardTestd1618f7_/asset/images/test.gif
  • file:///accounts/1000/APPDATA/com.example.ClipboardTest.testDev_ipboardTestd1618f7_/asset/images/test.gif

where the channel long 'accounts' is the result of:

QDir dir;
QString myString = dir.absolutePath();
const char* myChar = myString.toStdString().c_str();
qDebug(myChar);

How the hell can I get a file in my current directory loaded into a QFile object? Once it works, I'll test the following section:

//Open the file
    if(file.open(QIODevice::ReadOnly)) {
        qDebug("file.open SUCCESS");
    } else {
        qDebug("file.open FAILED");
    }
    QByteArray data = file.readAll();

Thank you!

I think that the assets: / / / does not work with QFile.
Try "app/native/assets/images/test.gif".

or QDir::currentPath() + "/ app/native/assets/images/test.gif".

Tags: BlackBerry Developers

Similar Questions

  • Need help with raw files

    I reinstalled and updated CS5, but I'm unable to open camera raw to my Canon Rebel T4i. I get the following message:

    Could not complete your request because the file appears to be a model of camera that is not supported by the installed version of Camera Raw.

    Please visit the Camera Raw help documentation for more information.

    Camera Raw is a plug-in in Adobe Photoshop, Photoshop Elements and Lightroom dealing with Raw files. Camera Raw should be updated for each new brand and model of camera that comes on the market. Camera Raw is frequently updated, but not all versions of Camera Raw are compatible with all versions of Photoshop.

    See 't-my-version-of-photoshop-or-lightroom-prise in load-my - http://blogs.adobe.com/crawlspace/2011/03/why-doesn camera .html

    According to http://helpx.adobe.com/creative-suite/kb/camera-raw-plug-supported-cameras.html

    the rebel T4i was first supported by Camera Raw 7.1.

    Camera Raw 7 + is only compatible with CS6 and higher.

    http://helpx.Adobe.com/x-productkb/global/camera-raw-compatible-applications.html

    Your choice:

    1. CS6 update
    2. Join the Cloud
    3. Convert all your T4i Raw DNG files using free Adobe's DNG Converter
      http://www.Adobe.com/products/Photoshop/extend.displayTab2.html
      Then, edit the DNG in your existing CS5.
  • Help with Raw files

    I use an Imac with processor PowerPC G5 2.1 Ghz running OS X 10.5.8 and Photoshop CS2.  I just bought a Nikon D300s and want to work with raw files.  Adobe told me that I need to CS5, which means that I would need to buy a new computer.  Is this in any way about this?

    You will need to convert your raw files to DNG with Adobe free Converter: http://www.adobe.com/products/dng/

  • Satellite U940 - 11b - need help with recovery files

    Madam/Sir,

    I have a question about a failure U940 - 11 c.

    The laptop crashed after be closed during recovery of windows procedures. I think that Windows is damaged, as a result, the laptop no longer starts. When turing the laptop on the following message is displayed: reboot and select proper boot device. See the image below:

    Files on the hard drive are very precious to me, so the hard drive can not be reset until I got the files. I tried to recover the boot files Ubuntu from a USB flash drive. Ubuntu began without any difficulty. The problem is that Ubuntu is not able to find the Windows hard disk. From Gparted, the following errors occurred:

    1. WARNING: / dev/sda contains the signatures of TPG, indicating that she has a GPT table. However, it doesn't have a valid fake msdos partition table, as it should. Maybe it has been altered - possibly by a program that does not include the GPT partition tables. Or maybe you deleted the table GPT and are now using a msdos partition table. It is a GPT partition table? :

    2. the GPT backup table is not at the end of the disc, as it should. This may mean another operating system to think that the drive is smaller. FIS, by moving the backup at the end (and revmoving the old backup)? :

    3. not all the space available to/dev/sdb appears to be used, van correct you the GPT to use all the space (special edition 39007920 blocks) or continue with the current configuration? :

    4. the disk is allocated:

    Do you have tips or advice that could help me get the files from the hard drive. I do not understand the errors and will not be able to solve this problem. Thanks in advance.

    Hello

    I suggest that you use the tool to disks in Ubuntu to mount your Windows partition.
    If the partition is damaged in an aborted recovery (or other reason), you will need to invest a lot of time and effort to successfully recover your data.

    Tom BR

  • I'm trying to get help with corrupted files or missing. I can't use my recovery Cd, because the file is missing in order to make it work properly.

    I tried to use the restore cd that came with my pc it want to work because it lacks the file I need to perform a recovery and try to fix it. Some of my updates are not installed.

    Hello

    1. have you received an error when update failed?
    2. that you get an error message saying that some files are missing or corrupt?

    You can check for errors in the Windows Update history.
    To check the update history:
    a. Click Start, click Control Panel.
    b. now click on Windows updates.
    c. click view update history.

    Refer to this link for help:
    http://Windows.Microsoft.com/en-us/Windows7/see-which-Windows-updates-are-installed

    Try to analysis of SFC (System File Checker) running on your computer.

    Scan SFC will Windows replace corrupted or missing system files on your computer.
    Scan sfc enforcement procedure:
    a. Click Start, click principally made programs, accessories, right-click on command prompt and select run as administrator.
    b. click on continue or provide administrator credentials if prompted.
    c. in the type in the following command prompt window and press ENTER:
    sfc/scannow

    Refer to this article for more information:
    http://support.Microsoft.com/kb/929833

    Let me know the exact error messages and also a brief description of your problem so that we can advance troubleshooting.

    Kind regards
    Afzal Taher-Microsoft Support.
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • Help with image files, drop box and save the changes?

    My husband put all our photos of drop box.  They are still on our computer, but we can now also access elsewhere.  But it has somewhat modified files.

    I'm putting together, cultures and (in general) to save the changes made to some images.  But I get an error.

    Example: The image I want to change is on the side.  I right-click on the file icon and select "Rotate clockwise" in the menu dropdown. Immediately, I raise the sound "bonk" and an error message appears: "you cannot rotate this image.  The file can be used or open in another program or maybe the file is read only.  It wasn't a problem before doing things to the drop box.
    So, I wait to make sure that everything is ok.  The image is not open anywhere else.  I clicked the properties option to see if it is in read-only mode.  He said that it is not.
    When I open the image and try to use the rotation on the bottom, it will turn.  But when I close the window, I get a different error message that says "Windows Photo Viewer cannot save changes to this picture because there is a problem with the properties of the image file."   There is a link at the bottom of the message box for "Why can't save this picture?  I clicked it.  He said "the subject you are looking for is not available in this version of Windows. For additional assistance, see multiple support options. "The more support options?  Get a tech savvy friend who could help me. Nice.
    Anyone know what I need to do to make this work?
    I don't know what version of windows we have.  I'm sure that's not Vista.  It's the one after that.

    Hello

    Thank you asking in the Microsoft Community.

    1. open Microsoft paint.

    2. navigate to the image through Microsoft Paint.

    3 try to rotate and save the image.

    4 let me know if you are able to.

    Post back with the result.

  • Need help with eps files

    Hi all I bought this stat reflections eps file, I want to use the icon in the lower right, but do not know how to separate the background... I need like a png... Oh can smart designers, anyone help? 10967425_s.jpg I tried to download the eps, but was not allowed to download it... Please please advise!  A big thank you.

    Here's a quick I did with the starfilter. It's a 1000 pixel wide PNG, so if it's enough, you can try this.

    Put it in "Screen" blend mode on your image, and it will look something like this:

  • Help with html files when you place the overlay Web content

    Hello

    We have an educational application with plenty of interactive exercises - which were originally designed in Flash.

    I have converted in HTML using Wallaby fla files. For each fla file, Wallaby creates a js, css and html file but also an active file.

    When I place the frame Web Content, and then link it to the html file, it link to the real HTML created Wallaby? It wont let me select the folder containing all the files in that, and I can't link to a zip file either... Then, how it recognizes assets if I select only the html file? (see screenshot)

    Screen Shot 2013-03-28 at 2.09.20 PM.png

    Or do I need to add a HTMLResources file and bind it to who?

    Thanks in advance for any help.

    You a link to the HTML file but make sure that these things are in their own folder or InDesign will add EVERYTHING in the folder that has the HTML in there.

    Bob

  • Need help with exe files.

    I am looking for an exe file to play on the laundry. How to insert the exe file in dreamweaver 8 to play when the page is loaded. Very similar to a flash movie is loading. The file is created with the extension exe and I can't change it or recreate. any help is appreciated. Thank you

    In general you can not do this on anything other than an intranet. Is it
    where you work? If so, then you should investigate using
    ActiveX to run this exe file - check the Microsoft site...

    --
    Murray - ICQ 71997575
    Adobe Community Expert
    (If you * MUST * write me, don't don't LAUGH when you do!)
    ==================
    http://www.dreamweavermx-templates.com - template Triage!
    http://www.projectseven.com/go - DW FAQs, tutorials & resources
    http://www.dwfaq.com - DW FAQs, tutorials & resources
    http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
    ==================

    "brananc1" wrote in message
    News:ee265m$LCT$1@forums. Macromedia.com...
    > I'm trying to get an exe file to play on the laundry. How do I insert the
    > exe
    > file in dreamweaver 8 to play when the page is loaded. Very similar to the loading
    > a
    > flash animation. The file is created with the extension exe and I can't
    > change
    > who or recreate. any help is appreciated. Thank you
    >

  • Need help with flashing file + question mark at startup

    My Macbook Pro has worked fine until yesterday. On startup, I get the flashing file, so I rebooted and held command + R. Once I have try disc recovery/upgrade to update OS/restoration I need a startup disk file to choose and everything is empty. How can I get the possibility of a boot disk? Do I need a physical disk? I just checked my box of the laptop and I don't have a physical disc.

    Thank you.

    If a flashing question mark appears when you start your Mac - Apple Support

    Which shows in disk utility that is located in the recovery?

    Cutting in-house of may have failed or yo have a problem with the internal connection.

    What model of MacBook Pro?

    This is the Office Mac Pro forum. I asked that your post moved to the forum of laptop MacBook Pro or another appropriate forum.

  • No HELP with OE6 file dbx missing no bak file

    Hi hope someone can help! my computer is old w/decrease storage and OE inbox has suddenly lost most of the emails. I know the old routine in what concerns the use of the .bak folder in the trash, but I did not!  I see the huge dbx file, but I can't restore it. I tried to compact the Inbox last night, but he said that there was not enough space. can anyone help? I'm afraid extract dbx will cause a crash. Thank you

    So can OK, you give me some steps to try to build on a new computer?

    A new computer into a XP machine? Right-click on the old Inbox.dbx file and drag it to a flash drive, choose copy here. Drag it from the flash player on the desktop of the other machine and then right-click | Properties and make sure it is not set to read only. Run DBXpress on the record.

    Or did you mean something else?

    Change. If you get a Win7 Pro, business, or ultimate edition, you can use OE in XP Mode.

    How to use Outlook Express in Windows 7
    http://www.oehelp.com/OEnWin7.aspx

  • Quick help with json file

    Hi all

    I'm trying to find a way to dig a json file. This is the structure of the file

    {
       "company" : 1,
       "employees" : [
          {
             "firstname" : "Tim Tom,
             "more_info" : {
                "address" : "123 lausanne",
    
             }
          }
       ],
       "total" : 750
    }
    

    right now I have used covered to do this way.

    bb::data::JsonDataAccess ja;
    QVariant jsonva = ja.loadFromBuffer(response);
    
    QVariantList employeeList = jsonva.toMap().find("employee")->toList();
    
    QVariantMap infoList = jsonva.toMap().find("employee")->toMap().find("more_info")->toMap();
    

    So the first employee works. I get the data off of it, including more_info

    but for the second, which doesn't seem to work. Is it because I need to loop on my first list?

    Thank you for the help

    Hello

    Browse the list using foreach:

    QVariantList employeeList = jsonva.toMap()["employees"].toList();
    
    foreach (QVariant v, employeeList)
    {
      QVariantMap employeeData = v.toMap();
      QVariantMap moreInfo = employeeData["moreInfo"];
    }
    

    An important point to note is that function find() can potentially return mapName.end () if the name was not found in the map. If you do not check for this case explicitly, the application will crash the incorrect entry.

    Another option which I use above is using operator [] that creates the key value if it is missing, and always returns a reference valid value, so it is not necessary validate the result.

  • Need help with some files

    Then I opened the Task Manager today only to find 3 things I'd never seen before, they were atieclxx.exe, csrss.exe and winlong.exe. I did a bit of googoling (?) and I'm a bit confused. I see a few similar questions on other forums were people said that they were a form of spyware, while others apparently say it is just a process about my graphics card and normal to run, but I had never seen before.

    I would be grateful if someone could give me some clarification.

    Thank you.

    For peace of mind I suggest you run a malware check

    I recommend that you run Disk Cleanup or cCleaner to remove temporary files as this will reduce the time to scan security software.

    Start the computer in safe mode with network and download and install Malwarebytes (free version for individuals only), updated definitions and run in normal mode. Disable other security software while you do the analyses.
    http://www.computerhope.com/issues/chsafe.htm

    http://www.Malwarebytes.org/products/malwarebytes_free
    http://helpdesk.Malwarebytes.org/entries/21892442-should-I-scan-with-Malwarebytes-anti-malware-in-safe-mode-

    Download and run SuperAntiSpyware (Free Edition)
    http://www.SUPERAntiSpyware.com/download.html

  • Need help with importing files

    Hi, I recently installed CC on Mac. I've already used on PC and I copied my Lightroom Catalog Previews etc. for Mac. I have also reformatted my hard drive with exFat. I imported the files into lightroom. Now, when I look at photos editing in Lightroom it says that my files are missing. What have I missed? Thank you!

    I don't know why you get the message you found... but... you are NOT importing the photos on your new computer. The procedure to follow is that you copy the file to catalog from the PC to the Mac, open the catalog file in Lightroom (file-> open the catalog) and then reconnect the photos in Lightroom there instructions: Adobe Lightroom - find folders and files moved or missing

  • Help with sound file

    Hello. I am new to audition. I have a sound (hear here: https://dl-web.dropbox.com/get/Bass%20Boom%20With%20Reverb%20Sound%20Effect%20%20%20HQ.wav? _subject_uid = 112345765 & w = AACX... ) which is perfect for what I want, but it is much too low in volume. I tried spliter volume in hearing by increasing the level of the Db in the Panel of waveform and increasing the level of entry. However, these two methods makes the sound distorted and unusable. Is there a way to do it, or can someone send me a link to the creation of a pole high disembodied voice such as the file I linked above?

    Thank you and best regards,

    WLM

    I'm under Win 8.1 with a card realtek sound. audition CC 2014

    "it's far too low in volume. (!!)

    Open the file in AA CS6, I see that the waveform peaks are already above 0 dB, not surprising when you are trying to "volume up" it distorts!

    Although not at all an expert in this field, I would suggest trying something like effects > Amplitude and Compression > hard limiter, perhaps the value ' limit to-.1dB "and perhaps experiment with the parameter 'Boost of entry' (default is + 6 dB, it should be possible to increase this) but it must be remembered by stimulating the entrance and by limiting the peaks will allow you to reduce the overall dynamic range.

    Probably you are trying to create some sound effects "earth-shaking"?

Maybe you are looking for