Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-44112

Windows: QFileDialog::setLabelText does not set Reject button label

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P4: Low
    • 5.10.0
    • 5.4.0
    • None
    • Qt 5.4.0 x64 (MSVC2013)
      Windows 8.1 Pro x64
    • Windows
    • Win32: d135acfa43810b2f7a2dba12688bbaa07a2e08cc (qtbase/dev, 10.1.2017, 5.9)

    Description

      When using setLabelText on a QFileDialog to change the default "Cancel" label text of the reject button, the text is not changed.

      The following code would produce a file dialog with an accept button with the text "Accept" and a reject button still having the default text "Cancel" instead of "Reject":

          QFileDialog* file_diag=new QFileDialog(this);
          file_diag->setWindowTitle("Test");
          file_diag->setOption(QFileDialog::ShowDirsOnly);
          file_diag->setFileMode(QFileDialog::Directory);
          file_diag->setLabelText(QFileDialog::Accept, "Accept");
          file_diag->setLabelText(QFileDialog::Reject, "Reject");
          file_diag->exec();
          delete file_diag;
      

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            owolff Oliver Wolff
            jubba Claudio Barutta
            Votes:
            4 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes