QFileDialog is a class from the Qt toolkit which provides a dialog allowing users to select files or directories.
Questions tagged [qfiledialog]
322 questions
0
votes
1 answer
Disabling/Enabling choose button of QFileDialog based on specific criteria
I have a QFileDialog prompting the user to select a directory. I am running QT version 4.3.5. I do not have the option of upgrading either.
I want the user to only be able to choose directories that contain two files with specific names. Something…
![](../../users/profiles/1183587.webp)
halexh
- 2,761
- 3
- 17
- 18
0
votes
1 answer
QFileDialog to default to AppData?
In my program, I have a button that opens a getOpenFileName dialog like this:
path = QFileDialog::getOpenFileName(this, tr("Select region"), "%APPDATA%", tr("region file"));
I want the dialog to default to the users AppData folder. All users are…
![](../../users/profiles/2356609.webp)
mrg95
- 1,999
- 5
- 34
- 70
0
votes
1 answer
qt5 designer, using fileopen, displaying file path in lineedit, is there an issue doing it this way?
just started using qt,
looked through docs, google, examples, etc.. trying to find simple examples(working mind you)
that showed how to do (imho) simple things, by themselves.
well i stumbled upon my answer and i was wondering if this approach would…
![](../../users/profiles/3092531.webp)
angjminer
- 3
- 3
0
votes
1 answer
QFileDialog issue with special character
#include
#include
#include
int main(int argc, char** argv){
QApplication app(argc, argv);
QFileDialog dlg;
dlg.setAcceptMode(QFileDialog::AcceptSave);
if (dlg.exec()) {
qDebug() <<…
![](../../users/profiles/1356110.webp)
Ashot
- 9,891
- 12
- 56
- 100
0
votes
0 answers
Custom QTreeView and QFileDialog
I would like to create a custom QFileDialog that has a QTreeView with a special behaviour:
I'd like the files in the directory to be represented as 1 file if they belong to such a sequence:
file0.jpg
file1.jpg
file2.jpg
...
would be represented as…
![](../../users/profiles/1835402.webp)
Lex
- 323
- 6
- 17
0
votes
1 answer
QFileDialog - create files without an extension
I'd like to use the QFileDialog to get the name of a new directory, where I will create several configuration files.
It will be nice if a directory name will not contain an extension part. How can I force a user, to do not provide the QFileDialog…
![](../../users/profiles/784345.webp)
Dejwi
- 3,945
- 10
- 38
- 64
0
votes
2 answers
how to hide sidebar in QFileDialog?
I need to hide/disable the sidebar (QSidebar) in the QFileDialog.
I've solved this problem using magic-woodoo with d-pointer and editing Qt source code (just like this).
Is there any more simple way to do it?
Thanks
![](../../users/profiles/1512083.webp)
std.approach
- 31
- 5
0
votes
2 answers
Data load infile_ python and Qfiledialog
hello i want to import data from an excel file or .txt to the database with the "load data Infile" but the path to my file contains "\" witch is not accepted by Mysql
to be clear this is my PYTHON code:
def parcourir(self):
…
![](../../users/profiles/1467819.webp)
Azizachom
- 43
- 1
- 6
0
votes
0 answers
QFileDialog under OSX dumps many errors to console
Trying to use QFileDialog under OSX 10.6.8, Qt 4.7:
QFileDialog *dialog = new QFileDialog(0,tr("Load Band Recordings"),qbh,tr("Wave Files (*.wav)"));
dialog->setFileMode(QFileDialog::ExistingFiles);
if (dialog->exec())
{
QStringList fileNames;
…
![](../../users/profiles/599484.webp)
fyngyrz
- 1,878
- 2
- 27
- 39
-1
votes
1 answer
QFileDialog::getOpenFileName() does not work in slot function?
I created this slot:
public slots:
void openNSelect();
then in the function :
QFileDialog::getOpenFileName(this,tr("select file"),"/home/",tr("text file(*.txt)"));
it doesn't show me the dialog,if I write that line in some other function like…
![](../../users/profiles/1051003.webp)
user1051003
- 1,071
- 3
- 14
- 24
-1
votes
1 answer
c++, Qt How to load a file and save loaded files as QObject in a list
This is my first question.
I want to load files like *.txt files and store these files as QObject (is it even possible to save these files as QObject?) in a list for a later use.
Like i open 3 *.txt files and store them as QObject in a list and…
![](../../users/profiles/11039768.webp)
Gwanghyeon Bak
- 9
- 1
-1
votes
1 answer
QFileDialog Crashes application on deleting multiple folders
Below is the code,
Header File
QtGuiApplication1.h
#pragma once
#include
#include "ui_QtGuiApplication1.h"
class QtGuiApplication1 : public QMainWindow
{
Q_OBJECT
public:
QtGuiApplication1(QWidget *parent =…
![](../../users/profiles/4750754.webp)
sk110
- 67
- 2
- 9
-1
votes
1 answer
Exporting as csv fits entirely in first cell
when i try to save my table (QTableWidget) as a csv file everything fits in the first cell from the excel file, how can i seperate each cell? this is my saving function:
def save_text(self, table):
path = QFileDialog.getSaveFileName(self,…
![](../../users/profiles/9486225.webp)
Iheb Saidani
- 61
- 4
-1
votes
1 answer
I can't save .txt file with QFileDialog, C++ QT
This is my code:
void MainWindow::save(){
QString fileName = QFileDialog::getSaveFileName(this, tr("Save Text File"), path, tr("Text Files (*.txt)"));
if (fileName != "")
{
QFileInfo info(fileName);
path =…
![](../../users/profiles/5711218.webp)
KFGC
- 1
- 4
-1
votes
1 answer
Click event is sent immediately after I start application (PySide and Python)
I have an application with a button for which the clicked signal is connected to a slot that opens a QFileDialog. I want to manipulate the state of the button (sender) within the slot depending on the actions taken by the user in the QFileDialog.…
![](../../users/profiles/4424698.webp)
Hrvoje T
- 2,003
- 3
- 20
- 32