QFileDialog is a class from the Qt toolkit which provides a dialog allowing users to select files or directories.
Questions tagged [qfiledialog]
322 questions
7
votes
2 answers
Qt QFileDialog - native dialogs only with static functions?
I'm trying to simply save a file. However, I need a filename entered without a suffix to automatically get a default suffix (which setDefaultSuffix() does).
I'd rather not completely lose the native save dialog just for this. exec() is not…
![](../../users/profiles/15896.webp)
darron
- 4,109
- 2
- 34
- 44
7
votes
1 answer
QFileDialog memory leak?
I'm just writing a small app in which I have function which looks like:
QString askForDir()
{
return QFileDialog::getExistingDirectory(this, "Choose directory", QString(""));
}
Since I've added this function I've mentioned that memory…
![](../../users/profiles/2333496.webp)
tema
- 1,049
- 11
- 31
7
votes
4 answers
qfiledialog - Filtering Folders?
1)I want to get the name of the folder for a folder monitoring Application..
Is there a way that i can filter out specific folders from being displayed using QFileDialog (For example i don't want the my documents to be displayed in the file…
![](../../users/profiles/215518.webp)
Jeba
- 943
- 4
- 12
- 25
6
votes
2 answers
Modifying QFileDialog::getOpenFileName to have an additional drop down
I am a student programmer using Qt to build a reader Table for my company. This reader is both an editor and converter. It reads in a .i file allows table editing of a text document and then puts out a .scf file which is essentially a separated…
![](../../users/profiles/1039044.webp)
Wylie Coyote SG.
- 919
- 5
- 19
- 37
6
votes
1 answer
Why does QFileDialog use slash instead of backslash?
Why "\" and "/" are mixed?
os.getcwd() emits backslash string.
On the other hand, QFileDialog emits forward slash string.
Why?
Example
Please execute this sample code.
from PySide import QtGui
from PySide import QtCore
import sys
import os
class…
![](../../users/profiles/6986533.webp)
Haru
- 1,491
- 1
- 9
- 23
6
votes
3 answers
Filtering in QFileDialog
I would like to filter the files that are shown in a QFileDialog more specifically than just by file extensions. The examples I found in the Qt documentation only show filters like Images (*.png *.xpm *.jpg);;Text files (*.txt);;XML files (*.xml)…
![](../../users/profiles/175194.webp)
Bitjuggler
- 85
- 2
- 6
6
votes
3 answers
How do I find out which suffix user has chosen when using a QFileDialog?
Well I'm using the following code to get the filename for a file that needs to be stored ..
QString fileName = QFileDialog::getSaveFileName(this, tr("Save File"),"/home/user/MyDocs/",tr("JPG files (*.jpg);;BMP files (*.bmp);;PNG files…
![](../../users/profiles/366207.webp)
Ahmad
- 11,274
- 24
- 79
- 132
6
votes
1 answer
No files visible in the QFileDialog window
I am writing a simple code using pyqt
In the code, I invoke a QFileDialog, however when I invoke it using the static functions all works fine, but with the normal method i.e. using dialog.exec_(), I do not see any files in the file dialog…
![](../../users/profiles/1637766.webp)
user1637766
- 61
- 1
- 4
5
votes
1 answer
PyQt4 filename dialog
I am a bit of a novice so be kind ;-)
I had a GUI that I made using PyQt4 and python 2.6 with a working file dialog, (ie you clicked a button and a window popped up and allowed you to pick a file to load/save). The code for the GUI is like 2000…
![](../../users/profiles/723645.webp)
Ben
- 4,915
- 7
- 40
- 57
5
votes
1 answer
History of multiple instances of QFileDialog
I am using QT in my C++ application. I know that when I use QFileDialog, the history is saved in the registry. Suppose I have multiple instances of QFileDialog within the application. Can I save the history for each instance separately? As far as I…
![](../../users/profiles/3456472.webp)
Jackzz
- 1,257
- 3
- 17
- 44
5
votes
1 answer
How do I get the system QFileDialog in Qt5?
I created file dialogs to select files within a Qt application. When migrating to Qt5 I encounter a regression, the file dialog is much poorer when linking against Qt5 rather than Qt4:
Qt4
Qt5
For example it is very hard for an user to navigate to…
![](../../users/profiles/1816078.webp)
Victor Lamoine
- 379
- 1
- 2
- 20
5
votes
2 answers
show only directories and executables on Ubuntu using QFileDialog
I'm trying to create a QFileDialog on Ubuntu that will allow the user to select an executable file, with the intent being that the file is a desktop application (i.e. analogous to the .exe subset of executable files on Windows).
On Windows, this is…
![](../../users/profiles/4052030.webp)
Nicolas Holthaus
- 6,800
- 3
- 39
- 79
5
votes
3 answers
What determines sorting of files in a QFileDialog?
Users open files in our app through a QFileDialog. The order of the filenames is bizarre. What is determining the sorting order, and how can we make it sort by filenames, or otherwise impose our own sorting, perhaps giving it a pointer to our own…
![](../../users/profiles/10468.webp)
DarenW
- 15,697
- 7
- 59
- 96
5
votes
3 answers
QFileDialog - differences between PyQt4/PyQt5/PySide
I have been working my way through Summerfields book on Rapid GUI programming with Python and QT (PyQt to be more precise), but the book from 2007 uses version 4.x and I am trying to get going with the current version (5.4.2).
There are some…
![](../../users/profiles/5026915.webp)
Keith Miller
- 51
- 2
5
votes
1 answer
QFileDialog cancelation
I'm new to QT. Currently in my project I implemented QFileDialog.
In my usecase : whenever user choose a text file, it executes functionA. However, I found that if I click cancel in the fileDialog, functionA will still be executed.
This is my code…
![](../../users/profiles/4561948.webp)
LOK CARD
- 243
- 2
- 13