Results 1 to 3 of 3

Thread: QDir::separator() and QFileDialog not consistent with slash character

  1. #1
    Join Date
    Aug 2008
    Posts
    24
    Thanks
    2
    Thanked 1 Time in 1 Post

    Default QDir::separator() and QFileDialog not consistent with slash character

    System: Win XP 32 Bit
    Dev Eng: Visual Studio 2005 w/SP1

    QFileDialog is returning a directory with the forward slash "/". The call I'm using is getExistingDirectory.

    When I get the directory separator from QDir::separator() it is a back slash "\".

    I 'expect' that these would be the same. I expect that both with match the OS platform/locale.

    I am using the commercial code with a modification to make wchar_t a built in type. Thus I needed to rebuild all the Qt code.

    Any ideas?

  2. #2
    Join Date
    Mar 2008
    Location
    Kraków, Poland
    Posts
    1,536
    Thanked 284 Times in 279 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QDir::separator() and QFileDialog not consistent with slash character


  3. #3
    Join Date
    Aug 2006
    Posts
    250
    Thanks
    19
    Thanked 49 Times in 36 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QDir::separator() and QFileDialog not consistent with slash character

    Basically it seems that any paths returned from Qt functions use / as the separator, so if I'm manipulating paths just use '/' directly instead of QDir::separator().

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.