views:

31

answers:

2

hi i am having one insert button from which i can select videofiles either from phne memory or memory card.but all the files are coming with name and extn(.3gp).how i will remove this or hide this in QT

+1  A: 

I'm guessing you're looking for the QFileInfo::baseName function. Do this:

QFileInfo( "/path/to/videofile.3gp" ).baseName()

This will return "videofile".

Lucas
A: 

hi my function is

void FileListWidget::displayVideoFiles()
{
    QStringList filters;
    if(isFileMedia)
        filters += "*.3gp";
    else
        filters += "*.txt";
    clear();
    addItems(dirPath.entryList(filters, QDir::AllEntries));
}

the path of the video file is _LIT(KPhoneMemory,"C:\Data\Videos");

how i will implement QFileInfo( "/path/to/videofile.3gp" ).baseName()

amit