You can use QFtp. For retrieving the list of files in a directory you can use QFtp::list function. When QFtp::list has been called, the listInfo signal is emitted once for each directory entry. It can be done like:
QFtp ftp;
connect( &ftp,SIGNAL(listInfo(QUrlInfo)),this,SLOT(ftpListInfo(QUrlInfo)) );
ftp.connectToHost( "ftp://user:password@ftp.myftp.com/needed_directory" );
if( ftp.state() == QFtp::LoggedIn )
ftp.list();
void FtpDialog::ftpListInfo( const QUrlInfo&info )
{
if( info.isFile() )
qDebug() << info.name();
}