PDA

View Full Version : QFileDialog filter shown different on Linux and Windows



chapu
12th May 2010, 17:10
I have a QFileDialog with the filter set to "Image Files (*.png)" like this:

QString fileName = QFileDialog::getOpenFileName(this, tr("Open Image Files"), "/home/data", tr(Image Files (*.png)");

When the dialog opens on Windows, the whole filter string is shown on the file selection area. But on Linux, it only shows "Image Files" part, not including the real filter string (*.png). Why is the difference? Any way to solve this?

Many QThanks.

JD2000
12th May 2010, 18:27
QFileDialog::setOption ( Option HideNameFilterDetails, bool on = false )

chapu
12th May 2010, 20:41
QFileDialog::setOption ( Option HideNameFilterDetails, bool on = false )

According to Qt 4.6 doc, option "QFileDialog::HideNameFilterDetails" is obsolete and does nothing since Qt 4.5.
I am using Qt 4.6.

jonathan.blakes
26th August 2010, 11:51
I am seeing this on Ubuntu Lucid. Is there a bug report link? Thanks.