Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
filedialogurls.cpp
Go to the documentation of this file.
1
// Copyright (C) 2016 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
3
4
#
include
<
QFileDialog
>
5
#
include
<
QtGui
>
6
7
int
loadFileDialog
()
8
{
9
//![0]
10
QList<QUrl> urls;
11
urls << QUrl::fromLocalFile(
"/Users/foo/Code/qt5"
)
12
<< QUrl::fromLocalFile(QStandardPaths::standardLocations(QStandardPaths::MusicLocation).first());
13
14
QFileDialog dialog;
15
dialog.setSidebarUrls(urls);
16
dialog.setFileMode(QFileDialog::AnyFile);
17
if
(dialog.exec()) {
18
// ...
19
}
20
//![0]
21
return
1;
22
}
loadFileDialog
int loadFileDialog()
Definition
filedialogurls.cpp:7
qtbase
src
widgets
doc
snippets
filedialogurls
filedialogurls.cpp
Generated on
for Qt by
1.14.0