Results 1 to 10 of 10

Thread: Native QFileDialog block

  1. #1
    Join Date
    Nov 2008
    Posts
    13
    Thanks
    4
    Qt products
    Qt4
    Platforms
    Windows

    Default Native QFileDialog block

    Hello,

    In the software I'm developping i need to open and save files. The problem is that when i use native QFileDialog (with static functions like QFileDialog::getOpenFileName() ) i can only specify a file that is in the directory in which the dialog was opened... If i want to change current folder (double-clicking on a directory, other buttons, etc...) the dialog become blocked and the only way to close the app is to use the task manager...

    I don't know how to fix this bug because it's apparently in the static functions of QFileDialog.

    Please note that i use QT 4.4.0

    Could someone help me ?

    Thank you in advance.

  2. #2
    Join Date
    Nov 2008
    Posts
    13
    Thanks
    4
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Native QFileDialog block

    Anybody has an idea?

    Here is some informations i found:

    the module which crashes is named 'hungapp'. The crash is present on all computers i have tested - and apparently not because of a virus.
    I cannot use debugger because de native file dialog get stuck when in this dialog i want to change current folder...

    I have searched the forum but haven't found a solution...

  3. #3
    Join Date
    Nov 2008
    Posts
    13
    Thanks
    4
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Native QFileDialog block

    I've searched again, and now i think there is a problem with the hook qt makes.
    But always no solutions...

    Please help it's very important

  4. #4
    Join Date
    Nov 2008
    Posts
    13
    Thanks
    4
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Native QFileDialog block

    Up.

    I retested with Qt Creator (and Qt 4.4.3) and when i try to change folder it works but a half-second later i have a lot of
    warnig : QFile::seek: QIODevice is not open

    in the output zone...

    I really don't understand anything...

  5. #5
    Join Date
    Oct 2008
    Location
    Krivoy Rog, Ukraine
    Posts
    70
    Thanks
    1
    Thanked 9 Times in 9 Posts
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Native QFileDialog block

    I think, you should report to Trolltech about that issue:

    http://trolltech.com/bugreport-form

  6. #6
    Join Date
    Nov 2008
    Posts
    13
    Thanks
    4
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Native QFileDialog block

    I send the bug.

    But if anyone has an idea it would be very useful. I have tested many things - but always without results...

  7. #7
    Join Date
    Dec 2008
    Posts
    4
    Qt products
    Qt4
    Platforms
    Windows

    Smile Re: Native QFileDialog block

    I was appear it, but I found that my code include some pic , it not resource , it is seem as:

    QMovie *movie = new QMovie("images/flower.gif");

    and then I use: QFileDialog::getOpenFileName and appear :

    QFile::seek: IODevice is not open
    QFile::seek: IODevice is not open
    QFile::seek: IODevice is not open
    QFile::seek: IODevice is not open

    and program is dead;


    so I changed it as resource:

    QMovie *movie = new QMovie(":/images/flower.gif");

    it succ

    mail to me: kyosold@qq.com

  8. #8
    Join Date
    Nov 2008
    Posts
    13
    Thanks
    4
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Native QFileDialog block

    Thank you very much !

    I will test this (I think that it could be the right solution because I use QMovie too...)

  9. #9
    Join Date
    Nov 2008
    Posts
    13
    Thanks
    4
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Native QFileDialog block

    OK, I have tested, and I found why there was this bug. In fact, QMovie loads a frame everytime the current frame change, because by default QMovie does not cache the data.

    By setting setCacheMode(QMovie::CacheAll) the bug disappear.

  10. #10
    Join Date
    Dec 2008
    Posts
    4
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Native QFileDialog block

    OK, I had learn it, thanks

Similar Threads

  1. Native QFileDialog
    By adonel in forum Qt Programming
    Replies: 1
    Last Post: 17th September 2008, 18:40
  2. QFileDialog in Qt designer
    By tpf80 in forum Qt Tools
    Replies: 1
    Last Post: 17th May 2007, 00:41

Tags for this Thread

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.