Results 1 to 2 of 2

Thread: File Management

  1. #1
    Join Date
    Jul 2015
    Posts
    16
    Thanks
    2
    Qt products
    Qt5
    Platforms
    Windows

    Question File Management

    How to work with file (Output , Input) in Qt 5 ??? (Solved)
    I know that i can do this with QFile class , but i don't know about working with the functions and streams. (Solved)
    My app hangs after the File management code.
    My code is the following , notice that the code is a very low-power antivirus solution :
    Qt Code:
    1. QFile VirusScanner(Current);
    2. while(!VirusScanner.atEnd()) {
    3. QString Line = VirusScanner.readLine();
    4. if(Line.toLower() == "open=regsvr.exe" || Line.toLower() == "open=newfolder.exe") {
    5. cout << "Autorun.inf virus detected. Deleteing..." << std::endl;
    6. const QString Virus_Path = VirusScanner.fileName();
    7. VirusScanner.close();
    8. QFile::remove(Virus_Path);
    9. }
    10. }
    To copy to clipboard, switch view to plain text mode 
    Last edited by Arshia Aghaei; 1st July 2015 at 07:19.

  2. #2
    Join Date
    Dec 2009
    Location
    New Orleans, Louisiana
    Posts
    791
    Thanks
    13
    Thanked 153 Times in 150 Posts
    Qt products
    Qt5
    Platforms
    MacOS X

    Default Re: File Management

    Start by reading the documentation for QFile.

Similar Threads

  1. Memory management in Qt?
    By wookoon in forum Qt Programming
    Replies: 7
    Last Post: 6th November 2010, 18:20
  2. Memory Management Reg
    By BalaQT in forum Newbie
    Replies: 10
    Last Post: 4th February 2010, 12:43
  3. large file management
    By sakthi in forum Qt Programming
    Replies: 1
    Last Post: 22nd October 2008, 08:13
  4. What is the best way to create a file management panel?
    By DIMEDROLL in forum Qt Programming
    Replies: 0
    Last Post: 24th September 2008, 08:49
  5. Memory management in QT
    By Gayathri in forum Qt Programming
    Replies: 1
    Last Post: 17th November 2006, 07:21

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.