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

Details

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

    Description

      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.

      Attachments

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

        Activity

          People

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

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes