QtFileDialog: allow showing hidden files
This commit is contained in:
parent
f4d8d8c6a1
commit
16fdfac7ae
1 changed files with 2 additions and 1 deletions
|
@ -24,6 +24,7 @@
|
||||||
|
|
||||||
// Qt
|
// Qt
|
||||||
#include <QFileDialog>
|
#include <QFileDialog>
|
||||||
|
#include <QDir>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
|
|
||||||
|
@ -68,7 +69,7 @@ void QtFileDialog::exec()
|
||||||
dlg.setLabelText(QFileDialog::Accept,QString::fromStdString(_buttonText));
|
dlg.setLabelText(QFileDialog::Accept,QString::fromStdString(_buttonText));
|
||||||
dlg.selectFile(QString::fromStdString(_placeholder));
|
dlg.selectFile(QString::fromStdString(_placeholder));
|
||||||
if(_showHidden){
|
if(_showHidden){
|
||||||
SG_LOG(SG_GENERAL, SG_ALERT, "QtFileDialog: can't show hidden files in Qt");
|
dlg.setFilter(dlg.filter() | QDir::Hidden);
|
||||||
}
|
}
|
||||||
if(dlg.exec()){
|
if(dlg.exec()){
|
||||||
QStringList result = dlg.selectedFiles();
|
QStringList result = dlg.selectedFiles();
|
||||||
|
|
Loading…
Reference in a new issue