Details
-
Bug
-
Resolution: Done
-
P4: Low
-
5.4.0
-
None
-
Qt 5.4.0 x64 (MSVC2013)
Windows 8.1 Pro x64
-
-
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;