Results 1 to 4 of 4

Thread: QFileDialog filter shown different on Linux and Windows

  1. #1
    Join Date
    Apr 2010
    Posts
    11
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default QFileDialog filter shown different on Linux and Windows

    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.

  2. #2
    Join Date
    Oct 2009
    Posts
    151
    Thanks
    6
    Thanked 13 Times in 11 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QFileDialog filter shown different on Linux and Windows

    QFileDialog::setOption ( Option HideNameFilterDetails, bool on = false )
    Got to keep the loonies on the path ...

  3. #3
    Join Date
    Apr 2010
    Posts
    11
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QFileDialog filter shown different on Linux and Windows

    Quote Originally Posted by JD2000 View Post
    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.

  4. #4
    Join Date
    Jul 2008
    Posts
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QFileDialog filter shown different on Linux and Windows

    I am seeing this on Ubuntu Lucid. Is there a bug report link? Thanks.

Similar Threads

  1. QFileDialog Filter Selector
    By SixDegrees in forum Qt Programming
    Replies: 0
    Last Post: 7th May 2010, 01:00
  2. How to filter executables in linux.
    By sudhansu in forum Qt Programming
    Replies: 3
    Last Post: 20th January 2010, 16:35
  3. QFileDialog filter
    By wirasto in forum Newbie
    Replies: 12
    Last Post: 20th January 2010, 12:40
  4. Replies: 2
    Last Post: 22nd July 2009, 20:16
  5. Replies: 8
    Last Post: 8th September 2008, 09:46

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.