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. Where is my QFileDialog getting this different text?

Where is my QFileDialog getting this different text?

Scheduled Pinned Locked Moved General and Desktop
4 Posts 3 Posters 1.0k Views
  • 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.
  • M Offline
    M Offline
    Moschops
    wrote on last edited by
    #1

    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?

    1 Reply Last reply
    0
    • JeroentjehomeJ Offline
      JeroentjehomeJ Offline
      Jeroentjehome
      wrote on last edited by
      #2

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

      Greetz, Jeroen

      1 Reply Last reply
      0
      • M Offline
        M Offline
        Moschops
        wrote on last edited by
        #3

        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.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          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.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          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