Move directory using Qt

I want to move the directory. My selected directory contains many subdirectories and files.

How can I implement the same with Qt?

+6
source share
1 answer

QDir :: rename does this in most cases. The following example moves the Dir file with the contents from the source to dest:

QString original = "/home/test/source/theDir"; QString dest = "/home/test/temp"; QDir dir; if( !dir.rename( original, dest ) ){ throw Exception( "move failed" ); } 
+10
source

All Articles