Results 1 to 3 of 3

Thread: QFileDialog::getSaveFileName issues with filename

  1. #1
    Join Date
    Dec 2006
    Posts
    4
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default QFileDialog::getSaveFileName issues with filename

    I am using Qt3 on Linux.
    I am trying to populate the save dialog with a filename that has the format "xxx:yyy".
    During execution I get a message box with the error "The protocol 'xxx' is not supported".
    Any ideas? Seems to me like a possible bug in Qt.

    Example code:
    filename = QFileDialog::getSaveFileName(startingDir + baseName, "", this);

    Where baseName contains "BAND_AVERAGE_GAINS:2006-12-11_2006-12-18".

    Thanks

  2. #2
    Join Date
    Jan 2006
    Location
    Alingsås, Sweden
    Posts
    437
    Thanks
    3
    Thanked 39 Times in 39 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QFileDialog::getSaveFileName issues with filename

    I'd say that putting colons in file names is bad practice. Not only does it make it impossible to use the files on Windows systems - it also makes it difficult to use when you are accessing it via different network protocols as the protocol is used to prefix the name and path (for example ftp://... or http://...)

  3. #3
    Join Date
    Dec 2006
    Posts
    4
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: QFileDialog::getSaveFileName issues with filename

    Quote Originally Posted by e8johan View Post
    I'd say that putting colons in file names is bad practice. Not only does it make it impossible to use the files on Windows systems - it also makes it difficult to use when you are accessing it via different network protocols as the protocol is used to prefix the name and path (for example ftp://... or http://...)
    Yes, for portability, you should do that. But Qt should also support the platform Linux/Unix which does allow colons in the filename.

    These names are historical, 7+years. The interface does allow you to save filenames with colons in them, it just breaks if you try to use them in the instantiation. I will probably just force the user to enter the filename manually. Which seems like the only solution available.

Similar Threads

  1. QDialog Issues
    By vijay anandh in forum Qt Programming
    Replies: 1
    Last Post: 17th October 2006, 09:24
  2. MySql plugin driver issues
    By stevey in forum Installation and Deployment
    Replies: 11
    Last Post: 20th September 2006, 14:45
  3. Issues regarding QMySql drivers and mysql database
    By bera82 in forum Qt Programming
    Replies: 2
    Last Post: 10th August 2006, 18:50
  4. Layout issues
    By vijay anandh in forum Qt Programming
    Replies: 2
    Last Post: 8th July 2006, 20:27
  5. QT 4.1 Designer issues with Mac
    By Tori in forum Qt Tools
    Replies: 4
    Last Post: 6th January 2006, 19:28

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.