Results 1 to 2 of 2

Thread: QFileDialog - will be closed after selecting a file

  1. #1
    Join Date
    Oct 2009
    Location
    Hamburg - Germany
    Posts
    8
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Question QFileDialog - will be closed after selecting a file

    Hello,

    on Linux, Qt 4.5.2, i open a QFileDialog, select a file and at once the dialog will be closed.
    No crash, get filename(s) as return value, it's equal if its a static or "normal" qfiledialog.
    My problem, i added a preview to the filedialog and can't use it, because the dialog will be closed after select a file. Maybe a bug, because it's on my subclass and at the normal QFileDialog class ?

    Qt Code:
    1. QStringList fileNames;
    2. box.setFileMode(QFileDialog::ExistingFile);
    3. if (box.exec())
    4. fileNames = box.selectedFiles();
    To copy to clipboard, switch view to plain text mode 

    Thank you

    Bo
    Last edited by skyperhh; 12th October 2009 at 17:57.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QFileDialog - will be closed after selecting a file

    I'd say this is because of your system setup. Is your system configured so that (in file manager) files are opened after clicking on them once or twice?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. subclass of QFileDialog
    By afail in forum Qt Programming
    Replies: 1
    Last Post: 18th May 2009, 17:09
  2. Check for invalid file name in QFileDialog
    By darren in forum Qt Programming
    Replies: 2
    Last Post: 7th November 2008, 14:43
  3. QFileDialog in Qt designer
    By tpf80 in forum Qt Tools
    Replies: 1
    Last Post: 17th May 2007, 00:41
  4. QFileDialog Mac / PC
    By hey in forum Qt Programming
    Replies: 3
    Last Post: 26th April 2007, 18:23
  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.