Logo Search packages:      
Sourcecode: qt4-x11 version File versions

filedialogurls.cpp

#include <QtGui>

int main(int argv, char **args)
{
    QApplication app(argv, args);
    
//![0]
    QList<QUrl> urls;
    urls << QUrl::fromLocalFile("/home/gvatteka/dev/qt-45")
         << QUrl::fromLocalFile(QDesktopServices::storageLocation(QDesktopServices::MusicLocation));

    QFileDialog dialog;
    dialog.setSidebarUrls(urls);
    dialog.setFileMode(QFileDialog::AnyFile);
    if(dialog.exec()) {
        // ...
    }
//![0]

    return app.exec();
}

Generated by  Doxygen 1.6.0   Back to index