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" ); }
source share