QFileDialog is a class from the Qt toolkit which provides a dialog allowing users to select files or directories.
Questions tagged [qfiledialog]
367 questions
3
votes
2 answers
PyQt QFileDialog exec_ is slow
I'm using a custom QFileDialog because I want to select multiple directories.
But the exec_ function is very slow, and I can't figure out why. I'm using the newest version of PyQt.
Code Snippet:
from PyQt4 import QtGui, QtCore, QtNetwork, uic
class…

Ahsous
- 125
- 2
- 9
2
votes
1 answer
Custom QFIleSystemModel with QFileDialog
I am currently implementing a project system that uses an archive instead of a directory to hold subfiles. I keep a data structure that holds the project's virtual file system, and write it out as need be.
I am now trying to implement the graphical…

beta
- 647
- 5
- 19
2
votes
1 answer
QPushButton remains pressed if QFileDialog is invoked in its slot
I have a simple QPushButton on the MainWindow. I've added a slot for it:
void MainWindow::on_mybutton_pressed() {
QString file_name = QFileDialog::getSaveFileName(
this,
tr("Saving File"),
QDir::homePath(),
…

Dmitriy
- 5,357
- 8
- 45
- 57
2
votes
1 answer
QFileDialog doesn’t list tty* files in /dev/ on Linux
I’m working on a Linux desktop application that needs to open a USB serial port, typically /dev/ttyUSB0 or /dev/ttyUSB1. I’m using QFileDialog to let the user select the file:
QFileDialog…

Luke Peterson
- 931
- 1
- 9
- 25
2
votes
1 answer
Qt Android blank window
Problem
I have a problem with Qt on Android in all my applications: after I close the QFileDialog (code below), I have a blank black window. I can't do anything in the application except close it.
Here is the code I use:
QFileDialog dialog(this,…

Tim
- 406
- 3
- 14
2
votes
2 answers
In qt QFileDialog setsuffix is not working in linux, how to solve?
I am working on a Save dialog for my qt app. Everything works, but if no file extension is added behind the filename, it won't automatically be saved with the file extension although the filter is selected.
I know i need to set a defaultsuffix…

Esocoder
- 1,032
- 1
- 19
- 40
2
votes
1 answer
How to open a file in android with qt having the content URI
How do i open a file with QFile with link in android -content://com.android.providers.downloads.documents/document/raw.pdf
I tried below code but its showing that the file not open
QString…

Husni Abdul Nazer
- 103
- 1
- 1
- 12
2
votes
2 answers
How to stop child window closing when a QFileDialog is cancelled
I have a parent class which handles opening projects. Projects can be opened from a child window which calls the parent function to handle opening the project. However, when a file-dialog is cancelled from the child window, the entire application…

Evan Brittain
- 547
- 5
- 15
2
votes
1 answer
QFileDialog with proxy model sort by date actually uses alphabetical order of date
In PyQt 5.11.2 (on Windows 10), QFileDialog with the DontUseNativeDialog option set has a bug when sorting by the 'Date Modified' column: it does not sort by the actual date - it sorts alphabetically by the non-zero-padded MM-DD-YYYY string, meaning…

Tom Grundy
- 736
- 5
- 26
2
votes
1 answer
PyQt5 reopen on the same directory I visited
I am using getOpenFileName to open file , I have 3 class that I bind between them in the main . For example ,
Class A ()
Class B ()
Class C ()
Main()
Main it showing window which have 3 pushing buttons : each button is calling one of…

Omar Abo Elsoud
- 154
- 2
- 12
2
votes
2 answers
Qt: How to find the nearest existing ancestor of a path, which itself may or may not exist
Motivating example:
In a previous session, the application has stored some path selected
by the user. In the meantime that path may have been deleted, moved,
renamed or the drive unmounted. The application would now like to let
the user…

Parker Coates
- 8,520
- 3
- 31
- 37
2
votes
1 answer
Moving widgets in window from QFileDialog library
Is it possible to move widgets in QFileDialog's window? Example during opening or saving file. I would like to make a space between file name's line edit and file type's combo box, so I need to move combo box one row lower. Is it possible to make…

Ieners
- 21
- 2
2
votes
1 answer
PyQt5 - how to bring the Qfiledialog to the front?
My code uses PyQt to open up a folder select dialog. Once a folder is selected it is minimized. I'd like for the dialog to pop up in front of any other windows. I haven't been able to find a solution yet. Any suggestions?
from sys import executable,…

rNOde
- 59
- 5
2
votes
2 answers
How to check the available free space of a selected drive in Qt?
I am using Qt5.6.2 in Windows 7.My Goal is to save a CustomDatafile to a selected drive (mostly a Pen drive or local drive or network drive).
So before saving the file I would like to check the available memory and write access of the selected…

vishnu
- 363
- 3
- 20
2
votes
2 answers
QFileDialog preview
I am trying to get a Qt5 QFileDialog to show previews for images when selecting them for opening.
Method 1: Extending the QFileDialog
I used this implementation of the dialog and it worked with Qt 5.6.1 .
Now I am using Qt 5.9.2 and it does not work…

Hize75
- 23
- 3