|
Last change
on this file since 537 was 2, checked in by Dmitry A. Kuminov, 16 years ago |
|
Initially imported qt-all-opensource-src-4.5.1 from Trolltech.
|
|
File size:
464 bytes
|
| Line | |
|---|
| 1 |
|
|---|
| 2 | #include <QtGui>
|
|---|
| 3 |
|
|---|
| 4 | int main(int argv, char **args)
|
|---|
| 5 | {
|
|---|
| 6 | QApplication app(argv, args);
|
|---|
| 7 |
|
|---|
| 8 | //![0]
|
|---|
| 9 | QList<QUrl> urls;
|
|---|
| 10 | urls << QUrl::fromLocalFile("/home/gvatteka/dev/qt-45")
|
|---|
| 11 | << QUrl::fromLocalFile(QDesktopServices::storageLocation(QDesktopServices::MusicLocation));
|
|---|
| 12 |
|
|---|
| 13 | QFileDialog dialog;
|
|---|
| 14 | dialog.setSidebarUrls(urls);
|
|---|
| 15 | dialog.setFileMode(QFileDialog::AnyFile);
|
|---|
| 16 | if(dialog.exec()) {
|
|---|
| 17 | // ...
|
|---|
| 18 | }
|
|---|
| 19 | //![0]
|
|---|
| 20 |
|
|---|
| 21 | return app.exec();
|
|---|
| 22 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.