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
 Novice
					
					
						Novice
					
					
                                        
					
						
							
								 
							
						
					
					
						 
    
    
    
    
    
    
   
    
    
       
    
    
    
    
   output while executing should be redirected to text file
 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 10:59. Reason: title is not explanatory
 Novice
					
					
						Novice
					
					
                                        
					
						
							
								 
							
						
					
					
						 
    
    
    
    
    
    
   
    
    
       
    
    
    
    
   Re: output while executing should be redirected to text file
 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));
}
 Re: output while executing should be redirected to text file
 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,
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