PDA

View Full Version : Rendering Error using FileDialog on Linux (Ubuntu 12.04)



ewferg
2nd November 2015, 02:56
I have encountered an odd rendering error when trying to use FileDialog in a program that I am developing. This program currently uses Qt version 5.4.2. Before running the program, I performed a native compile on a Parallel’s Virtual Machine with the following specifications:

Ubuntu 12.04 using Unity Desktop Environment
64-bit
2 CPUs with 8 GB memory
1024 MB Video Memory with 3D acceleration


When the program first opens a FileDialog, the dialog doesn't seem to render fully
11490

Then, when you click on an item within the dialog, it adjusts to the following
11489

The directory navigation tree that is suppose to appear in the center section of the dialog remains empty, so no files or other directories can be selected. This makes the dialog completely unusable.

I have many other dialogs within this program that seem to render just fine - it is only the FileDialog that seems to be causing me trouble.

Does anyone have any insight into this issue? Any help would be extremely appreciated!!!!

Ginsengelf
3rd November 2015, 07:18
Hi, do you open your file dialog using one of the static functions or do you construct it yourself?

Ginsengelf

ewferg
3rd November 2015, 07:23
I have been using two of the static functions, QFileDialog::getOpenFileName and QFileDialog::getSaveFileName

ewferg
4th November 2015, 17:47
Still no luck fixing this error:

I replaced my the static function QFileDialog::getOpenFileName with the following code, and I got the same response:



QFileDialog fileDialog(this);
fileDialog.setFileMode(QFileDialog::ExistingFile);
fileDialog.setNameFilter(tr("Script Files (*.py)"));
QStringList fileNames;
if (fileDialog.exec()) fileNames = fileDialog.selectedFiles();

jesusdz
5th February 2016, 16:02
Hi, I'm having exactly the same problem. Did you find the solution?

Added after 1 8 minutes:

This was a known bug and it is solved by passing the dialog the option QFileDialog:: DontUseNativeDialog, according to this link (https://bugreports.qt.io/browse/QTBUG-45670).