Results 1 to 3 of 3

Thread: Copy a file?

  1. #1
    Join Date
    May 2006
    Posts
    108
    Thanks
    35
    Thanked 2 Times in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Question Copy a file?

    Hello,

    when i try to copy a file, create qt additional a file like this "qt_temp.xxxxxx". That do qt only when "if (settings)" come true.

    Qt Code:
    1. QFile file(QDir::home().absolutePath() + "/settings.xml);
    2. if (settings) //e.g. settings = "c:\programs\myapp\settings.xml"
    3. {
    4. file.setFileName(settings);
    5. }
    6. if (file.exists() == false)
    7. {
    8. file.copy( ":/settings/settings.xml", file.fileName() );
    9. }
    To copy to clipboard, switch view to plain text mode 

    Can anyone help me?

    Thanks.

  2. #2
    Join Date
    May 2006
    Posts
    788
    Thanks
    49
    Thanked 48 Times in 46 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Copy a file?

    on window i found problem copy direct from resource to other file...
    open in on QDomDocument and save string to file... is secure and file permission looks ok...

  3. #3
    Join Date
    May 2006
    Posts
    108
    Thanks
    35
    Thanked 2 Times in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Copy a file?

    In this case can i use QDomDocument and that works fine for me, thank you. Sometime i do this with other files what an i do in this case?

Similar Threads

  1. copy file on Vista
    By Lele in forum Qt Programming
    Replies: 0
    Last Post: 6th July 2007, 16:38
  2. qt-3.3.8 fail in scratchbox
    By nass in forum Installation and Deployment
    Replies: 0
    Last Post: 25th May 2007, 15:21
  3. Sending Binary File with QFTP
    By nbkhwjm in forum Newbie
    Replies: 2
    Last Post: 7th March 2007, 18:10
  4. file copy in Qt 3.3.4 ?
    By npc in forum Newbie
    Replies: 6
    Last Post: 31st March 2006, 14:43
  5. Replies: 4
    Last Post: 24th February 2006, 10:30

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
  •  
Qt is a trademark of The Qt Company.