Results 1 to 4 of 4

Thread: QFileDialog getSaveFileName not showing the default filename on Fedora 33

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Apr 2021
    Qt products
    Qt4 Qt5

    Default QFileDialog getSaveFileName not showing the default filename on Fedora 33


    I'm working on a Qt application and need to show a file dialog for user to save a file. To make it convenient for the user, i need to show a default filename when the file dialog opens so the user just have to click on save and the file will be saved.
    This is the code block:

    Qt Code:
    1. QFileDialog *dialog;
    2. dialog = new QFileDialog;
    3. QString fileName = dialog->getSaveFileName(0,dialog->tr("Save Logs"),"",dialog->tr("Logs (*.zip);;All Files (*)"));
    To copy to clipboard, switch view to plain text mode 

    When the dialog opens, the filename box is blank there instead it should contain "" as filename.

    Also, note that this same function is working on Ubuntu 20.04 and not on Fedora 33.
    For Ubuntu 20.04 I'm using Qt : Qt Creator 4.11.1 Based on Qt 5.14.1
    For Fedora 33: Qt Creator 4.13.2 Based on Qt 5.15.2

    I'm guessing the version difference between Qt creator might have caused this issue. But i dont know what changed in the getSaveFileName() function. Could anyone please help ?
    Last edited by d_stranz; 26th April 2021 at 16:26. Reason: missing [code] tags

Similar Threads

  1. QInputDialog like QFileDialog::getSaveFileName
    By BIllNo123 in forum Newbie
    Replies: 5
    Last Post: 23rd September 2010, 14:51
  2. problem with QFileDialog::getSaveFileName
    By navi1084 in forum Qt Programming
    Replies: 4
    Last Post: 26th June 2009, 07:38
  3. A question about QFileDialog::getSaveFileName
    By Ali in forum Qt Programming
    Replies: 1
    Last Post: 12th October 2007, 19:46
  4. QFileDialog::getSaveFileName default extension
    By elcuco in forum Qt Programming
    Replies: 2
    Last Post: 10th August 2007, 20:13
  5. QFileDialog::getSaveFileName issues with filename
    By dugs in forum Qt Programming
    Replies: 2
    Last Post: 11th December 2006, 17:17

Tags for this Thread


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.