Results 1 to 3 of 3

Thread: QFileDialog Issue

  1. #1
    Join Date
    Dec 2006
    Posts
    211
    Thanks
    27
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Question QFileDialog Issue

    Hi All,

    I m using Qt 4.2.2 on my Intel mac.
    I m using QFileDialog::getExistingDirectory to get the dir to save a file.

    Qt Code:
    1. QString s = QFileDialog::getExistingDirectory
    2. (
    3. this, tr("Open Directory"),QString::null,QFileDialog::ShowDirsOnly | FileDialog::DontResolveSymlinks
    4. );
    To copy to clipboard, switch view to plain text mode 
    I have some Issue in this.

    1. If I click the cancel button of the dialog it still taking the value of Dir.

    2. When I take the value from this Dialog in a String I want that the memory used and reference used by this QFileDialog will be released.


    If anyone knows then plz help me.


    Thanks.
    Last edited by wysota; 27th February 2007 at 12:55. Reason: missing [code] tags

  2. #2
    Join Date
    Aug 2006
    Location
    banglore
    Posts
    21
    Thanks
    1
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Re: QFileDialog Issue

    Check the string when u click the cancel button, it should be empty..

    Also when the QFile dialog has been closed, it will automatically releases it memory.. no need to do anything..

    Regards,
    mani

  3. #3
    Join Date
    Dec 2006
    Posts
    211
    Thanks
    27
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Question Re: QFileDialog Issue

    Quote Originally Posted by manivannan_1984 View Post
    Check the string when u click the cancel button, it should be empty..

    Also when the QFile dialog has been closed, it will automatically releases it memory.. no need to do anything..

    Regards,
    mani

    Actually my first problem is solved but I m not sure it is releasing the memory or not.
    Actually I m saving some data in file in mac using File System API but when I again open the QFileDialog my system crashes.


    and it is giving Bad access on the line where QFileDialog is open.

Similar Threads

  1. QFileDialog hidden files
    By blukske in forum Qt Programming
    Replies: 3
    Last Post: 8th March 2007, 02:11
  2. qt3 to qt4 - uic issue
    By hvengel in forum Qt Programming
    Replies: 10
    Last Post: 4th March 2007, 02:59
  3. Auto resolve in QFileDialog
    By Levon Nikoghosyan in forum Qt Programming
    Replies: 1
    Last Post: 29th November 2006, 11:15
  4. Replies: 5
    Last Post: 22nd September 2006, 08:04
  5. copy file/s from QFileDialog
    By raphaelf in forum Newbie
    Replies: 4
    Last Post: 4th July 2006, 14:26

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.