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

Clear button still works on read only lineedits

    XMLWordPrintable

Details

    • 161e8653c342278a4881da952ea723b107df93c0, 142c5ef9ddd17e59d8d096ab065aee8cb50f5e8f

    Description

      If a lineedit is read only and the clear button is enabled it is possible to clear the lineedit even if it is read only.

      In this case the clear button should either be hidden or at least deactivated.

      QLineEdit *edit = new QLineEdit();
      edit->setClearButtonEnabled(true);
      edit->setReadOnly(true);
      edit->setText("test");
      

      Perhaps it would make sense to do the same for disabled lineedits. But that is debatable.

      Attachments

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

        Activity

          People

            kleint Friedemann Kleint
            mkrems Marcel Krems
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes