Results 1 to 2 of 2

Thread: QFileDialog's getOpenFileName crash in 10.5.x Leopard

  1. #1
    Join Date
    May 2007
    Posts
    110
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X

    Default QFileDialog's getOpenFileName crash in 10.5.x Leopard

    Hi

    When i m using QFileDialog:ontUseNativeDialog flags for Non-Native Dialog while getOpenFileName and getSaveFileName in 10.5.x Leopard..

    On initiating dialog it repeatedly crashes.

    I m using like this while Translation purpose in Japanese lang.
    QString str = QFileDialog::getOpenFileName(this,tr("OPen"),QDir: :currentPath(),NULL,NULL,QFileDialog:ontUseNativeDialog);

    I m not figure out of this crash in 10.5.x

    Thanks
    Santosh

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: QFileDialog's getOpenFileName crash in 10.5.x Leopard

    I'll take a guess assuming that this line is the actual cause: that's all that is possible without any description of the nature of the crash.

    Qt Code:
    1. QString str = QFileDialog::getOpenFileName(
    2. this, // parent, possible cause of crash if invalid or becomes invalid after dialog opens
    3. tr("OPen"), // caption
    4. QDir::currentPath(), // directory
    5. NULL, // filter string (type should be const QString &)
    6. NULL, // selected filter, null is default
    7. QFileDialog::DontUseNativeDialog // options
    8. );
    To copy to clipboard, switch view to plain text mode 
    From the QFileDialog::getOpenFileName() docs:
    Only files that match the given filter are shown. The filter selected is set to selectedFilter. The parameters dir, selectedFilter, and filter may be empty strings.
    A null pointer is not an empty string so start there. Doesn't crash my Linux or Windows boxes though.

    You could help your cause by using your debugger to see where it dies and reporting more information.

Similar Threads

  1. QFileDialog::getOpenFileName in DLL
    By OverTheOCean in forum Qt Programming
    Replies: 1
    Last Post: 22nd February 2011, 09:31
  2. getSaveFileName and getOpenFileName Crash
    By pmohod in forum Newbie
    Replies: 2
    Last Post: 20th April 2010, 09:47
  3. Problem with QFileDialog::getOpenFileName()
    By spud in forum Qt Programming
    Replies: 4
    Last Post: 1st November 2007, 22:31
  4. Replies: 1
    Last Post: 14th October 2007, 23:10
  5. QFileDialog::getOpenFileName() gets stucked
    By elcuco in forum Qt Programming
    Replies: 5
    Last Post: 28th March 2006, 23:09

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.