Where is my QFileDialog getting this different text?



  • I am creating a QFileDialog as follows, with the static function:

    @ QString dir = QFileDialog::getExistingDirectory(0, TranslationHelper::tr(QObject::tr("Select project directory")),
    QString(),
    QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks );@

    The box that pops up has the word "Choose" where I expect to see "Open", or maybe "Ok" or "Select" or something more common. The original creators of this set of code had a real thing about the word "Choose" that I'm slowly eradicating as I go (on the generally accepted company decision that it sounds childish - the original developers spoke English as a second language, so it probably sounded very reasonable to them); we're going with "Select" where appropriate, and in this case I'd be happy with whatever was originally the default. I seem to think it should be "Open", but I'm pretty sure it's not "Choose".

    But I can't find where it's being set. I've trawled through the code for the word "Choose" and can't find any instances that look like they've got anything to do with QFileDialog. How have they done this? I know that we have a slightly custom build of the QT libraries (4.8.4, custom built); could they have been in there and done this?

    Or am I going insane and actually "Choose" is the default?



  • Hi,
    If you used the translator, maybe check the QtLinguistic files for a reference??



  • That is a good guess; I have already trawled through that (I've grepped over my complete source directory structure for the word "Choose"), but that was a good idea that sadly didn't work out :)

    Maybe "Choose" is the default and I'm just going insane. I've spent so much time eradicating the word "Choose" that now it seems wrong everywhere I encounter it.


  • Lifetime Qt Champion

    Hi,

    When calling the static functions (and unless told otherwise) Qt uses the native file dialogs, so it may very well be a side effect of that that you are seeing.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.