Results 1 to 4 of 4

Thread: saving a file in sdcard

  1. #1
    Join Date
    Jul 2014
    Posts
    12
    Thanks
    4
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default saving a file in sdcard

    Hello
    i'm new to Qt. i want to save a pdf file in sdcard n in results folder, but pdf report is generated outside the folder in sdcard. plz help me to solve this
    Qt Code:
    1. filename_pdf.clear();
    2. filename_pdf.append(filename);
    3. filename_pdf.append("sdcard/results/reports");
    4. filename_pdf.append("_Report");
    5. filename_pdf.append(".pdf");
    To copy to clipboard, switch view to plain text mode 

  2. #2
    Join Date
    Mar 2008
    Location
    Kraków, Poland
    Posts
    1,536
    Thanked 284 Times in 279 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: saving a file in sdcard

    Because the resulting file name is "filenamesdcard/results/reports_Report.pdf". I do not think it was what you mean.

  3. #3
    Join Date
    Jul 2014
    Posts
    12
    Thanks
    4
    Qt products
    Qt4
    Platforms
    Unix/X11

    Unhappy Re: saving a file in sdcard

    nope
    i want the report to be save in sdcard/results/reports.
    plz tell me a way to do it.

  4. #4
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: saving a file in sdcard

    In imperative lanuages such as C++, the order of statements matters.
    They are basically executed from top to bottom.

    Cheers,
    _

  5. The following 2 users say thank you to anda_skoa for this useful post:

    vinaysagar (12th August 2014), west (12th August 2014)

Similar Threads

  1. Downloading a file and saving in a path
    By StarRocks in forum Qt Programming
    Replies: 19
    Last Post: 3rd January 2013, 06:43
  2. Saving Text and Images as a file
    By rleojoseph in forum Qt Programming
    Replies: 2
    Last Post: 15th February 2011, 09:15
  3. Saving rich text to XML file
    By been_1990 in forum Newbie
    Replies: 5
    Last Post: 2nd August 2010, 23:46
  4. Problems saving a text file
    By aarelovich in forum Qt Programming
    Replies: 3
    Last Post: 27th September 2009, 14:39
  5. Saving a password in a file
    By srohit24 in forum Qt Programming
    Replies: 12
    Last Post: 25th June 2009, 07:50

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.