Results 1 to 7 of 7

Thread: qfiledialog getOpenFileName under linux doesn't show any files

  1. #1
    Join Date
    Jul 2012
    Posts
    9
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default qfiledialog getOpenFileName under linux doesn't show any files

    Hey guys by porting my code to linux i get the problem that my getOpenFileName of class QFileDialog doesn't show any files. What's my fault?

    Qt Code:
    1. QFileDialog::getOpenFileName(this,"./", "*.*", "open file dialog");
    To copy to clipboard, switch view to plain text mode 

    thx in advance

  2. #2
    Join Date
    Jul 2012
    Posts
    9
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: qfiledialog getOpenFileName under linux doesn't show any files

    no answer?

  3. #3
    Join Date
    Sep 2011
    Posts
    1,245
    Thanks
    3
    Thanked 127 Times in 126 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: qfiledialog getOpenFileName under linux doesn't show any files

    1) there're no files.

    2) You put arguments in the wrong order.
    http://doc.qt.io/qt-4.8/qfiledialog.html#getOpenFileName
    If you have a problem, CUT and PASTE your code. Do not retype or simplify it. Give a COMPLETE and COMPILABLE example of your problem. Otherwise we are all guessing the problem from a fabrication where relevant details are often missing.

  4. #4
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,593
    Thanks
    13
    Thanked 1,587 Times in 1,516 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: qfiledialog getOpenFileName under linux doesn't show any files

    Apart from amleto's observation about argument; on Linux a file pattern "*.*" is not necessarily going to show all the files in a given location.

  5. #5
    Join Date
    Jul 2012
    Posts
    9
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: qfiledialog getOpenFileName under linux doesn't show any files

    but what pattern will show all files?

  6. #6
    Join Date
    Sep 2011
    Posts
    1,245
    Thanks
    3
    Thanked 127 Times in 126 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: qfiledialog getOpenFileName under linux doesn't show any files

    "*" ?



    ................
    If you have a problem, CUT and PASTE your code. Do not retype or simplify it. Give a COMPLETE and COMPILABLE example of your problem. Otherwise we are all guessing the problem from a fabrication where relevant details are often missing.

  7. #7
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,420
    Thanks
    37
    Thanked 1,545 Times in 1,495 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: qfiledialog getOpenFileName under linux doesn't show any files

    That argument is the filename filter, if you don't want to filter anything, don't specify one.

    Cheers,
    _

Similar Threads

  1. Icon in a QMenu doesn't show up on Linux
    By agarny in forum Qt Programming
    Replies: 4
    Last Post: 2nd February 2011, 14:58
  2. Replies: 9
    Last Post: 28th April 2010, 09:18
  3. Replies: 2
    Last Post: 17th February 2010, 04:47
  4. QFileDialog::getSaveFileName doesn't show file name.
    By cydside in forum Qt Programming
    Replies: 3
    Last Post: 23rd July 2009, 10:18
  5. QRubberBand doesn't show (X11/Linux)
    By QwertyManiac in forum Qt Programming
    Replies: 2
    Last Post: 29th October 2008, 22:58

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.