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

QProgressDialog cancel button is shown again after setting it to nullptr, if language is changed using QTranslator

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • 5.9.0
    • None
    • Windows

      When I create a QProgressDialog, and set the cancel button to be hidden by using 

      setCancelButton(nullptr);

      it will be shown again when QEvent::LanguageChange event is triggered. Using

      setCancelButtonText(QString());

      works fine. I checked the source code, and noticed that QProgressDialog::setCancelButtonText sets useDefaultCancelText flag to false, while QProgressDialog::setCancelButton doesn't. This flag is then used when changeEvent is triggered due to language change, and if it is true, it will create the default cancel button.

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

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            thuga Adis Tosumovic
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes