When using a QFileDialog to save a file and to specify the extension (like *.pdf) and the user types in a name without this extension, also the saved file hasn't this extension.
Example-Code:
QFileDialog fileDialog(this, "Choose file to save");
fileDialog.setNameFilter("PDF-Files (*.pdf)");
fileDialog.exec();
QFile pdfFile(fileDialog.se...
Hi all,
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 dialog)..
2)I don't want the user to select a drive. By default in this code drives can...
I want the filter in a QFileDialog to match all audio file types supported by Phonon on the platform in question.
1 - However I am not able to find a way in Qt to use mime types in a filter. How can I do that?
2 - Or how can I find the corresponding file extensions for the mimetypes manually? The solution should be Qt based, or at leas...
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 overloaded from QDialog, so it totally bypasses the native hook (ignoring the DontUseNativeDialo...
hello everyone,i would like to know is there any way to select only some directories and some files at a time using qfiledialog class.here i set filesfilter..but i also need to set folder filter i mean i want only certain/some folders to be selected of name (i mean i need a filter for folders too.. coz i hav a common format for my applic...
Basically when browsing folders inside a QFileDialog I find very annoying to have everything bloated with hidden or backup folders (don't know how to call them really); specially on home.
Is there a way to prevent these type of folders from showing by default on a QFileDialog?
I'm using Qt4.6 and getOpenFileName.
P.D.: I'm starting to...
I am writing a qt application, with the goal of it being portable to the 3 major operating systems.
I am using QFileDialog to select a folder, and then adding it to a QListWidget. However the folder name is being returned as E:/media even though I am on Windows. I would want it to return E:\media
I could use a simple string replace, bu...
I am making a Qt application and I have a button to open a file, which is connected to a custom slot. This is the slot code so far:
void MainWindow::file_dialog() {
const QFileDialog *fd;
const QString filename = fd->getOpenFileName();
}
How could I have it then convert the file name to a const char *, open the file, read it a...
Hi guys .. 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 (*.png)"));
I'm providing the user with a number of options regarding the file format in w...
Hi,
I want to make a QT4 (using QT designer) dialog, that contains a part where a file has to be selected.
Now, I know QFileDialog exists, and I can program something that does what I want.
But can I also just do it in QT designer?
Is there some way to get a "file select" widget in QT designer?
Or, I remember these buttons, having the...
I would like to build a dialog similar to QFileDialog::getExistingDirectory() for which the OK-button only is enabled when the selected directory contains certain files.
I know I cannot achieve this with QFileDialog, instead I would have to come up with my own QDialog that has a QTreeView coupled to a QFileSystemModel.
How can I limit...
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 comparison function?
The documentation and online forums haven't been helpful. Unless i...
Is there a way of doing this without using a QItemDelegate? I've been having a lot of trouble with it. For example, if I use a Delegate:
1) Won't have a native dialog.
2) I'll have to implement my own image preview,
2) For some reason I can't resize the window cause setGeometry doesn't work, etc etc.
QWidget *createEditor(
QWi...