Results 1 to 4 of 4

Thread: output while executing should be redirected to text file

  1. #1
    Join Date
    Oct 2007
    Posts
    21
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Smile output while executing should be redirected to text file

    hi,
    I am working in QT4.3.0 and i want to redirect the output of my exe into a textfile .I dont want to do this in console.I want to do it in my cpp file itself.
    Thanks in advance
    Last edited by AnithaRagupathy; 13th October 2007 at 09:59. Reason: title is not explanatory

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Exe

    J-P Nurmi

  3. #3
    Join Date
    Oct 2007
    Posts
    21
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: output while executing should be redirected to text file

    Actually i am using qt 's unit testing framework.I am not able to incorporate in my pgm.
    Can i use QCoreapplication class and get the exe path and then process further..

    my pgm is like this...
    void x()
    {
    CopyDirectoryCommand *obj;
    obj = new CopyDirectoryCommand("C:\\check","C:\\tmp1\\",
    CopyDirectoryCommand::sCopyCallback,reinterpret_ca st<long>(obj));
    Utils::sCopyDirectory("C:\\check","C:\\tmp\\",
    CopyDirectoryCommand::sCopyCallback,reinterpret_ca st<long>(obj));
    }

  4. #4
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: output while executing should be redirected to text file

    Then see QTestLib command line options:
    -o filename
    write output to the specified file, rather than to standard output


    EDIT: Btw,
    Quote Originally Posted by AnithaRagupathy View Post
    my pgm is like this...
    void x()
    {
    CopyDirectoryCommand *obj;
    obj = new CopyDirectoryCommand("C:\\check","C:\\tmp1\\",
    CopyDirectoryCommand::sCopyCallback,reinterpret_ca st<long>(obj));
    Utils::sCopyDirectory("C:\\check","C:\\tmp\\",
    CopyDirectoryCommand::sCopyCallback,reinterpret_ca st<long>(obj));
    }
    I don't see anything relevant to Qt in here. There's no single Qt class or function being used in this code snippet. What are you trying to tell us with this code?
    J-P Nurmi

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.