Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QFileDialog directory only behavior not the same on Win 7 and Win XP
Forum Updated to NodeBB v4.3 + New Features

QFileDialog directory only behavior not the same on Win 7 and Win XP

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 564 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    ghleclerc
    wrote on last edited by
    #1

    Hello,

    I have the following code:


    QString someStringInMyProgram;

    QFileDialog getCalcFilePath( this );
    getCalcFilePath.setFileMode( QFileDialog::Directory );
    getCalcFilePath.setOptions( QFileDialog::ShowDirsOnly );
    getCalcFilePath.setWindowTitle( "blablabla" );

    if( !someStringInMyProgram.isEmpty() )
    {
    getCalcFilePath.setDirectory( someStringInMyProgram );
    }

    if( getCalcFile.exec() == QDialog::Accepted )
    {
    someStringInMyProgram = getCalcFile.selectedFiles()[0];
    }


    Doing this on OSX and Windows 7 yeilds the expected behavior, but when I run the code on Windows XP (we still have some old computers running old software that we can't get rid of right now, please don't tell me to stop using XP), the file dialog actually shows files and expects a file to be selected.

    I will patch my code right now and I will test the Windows version number using GetVersionEx(), but I wanted to see if anyone else had the problem and if it is something I am doing wrong.

    I have found this thread (URL was active at the time of my writing this post) which points to the same issue, but with no answer.

    In any case, thanks in advance for any help.

    1 Reply Last reply
    0
    • K Offline
      K Offline
      koahnig
      wrote on last edited by
      #2

      Did you check already on JIRA?
      Also what is the Qt version ?

      Vote the answer(s) that helped you to solve your issue(s)

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved