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

TextField clipping breaks batching; so maybe avoid populating characters outside?

    XMLWordPrintable

Details

    Description

      seen on IRC:

      <Murat> Hi all ! We have significant number of text fields in out quick scene and from what I can observe the renderer is not able to batch them properly due to the clipping that comes with TextField that we can't get rid of :
      <Murat> https://code.woboq.org/qt5/qtquickcontrols2/src/quicktemplates2/qquicktextfield.cpp.html#911
      <Murat> We can use TextInput which doesn't have the clipping but then, as you can imagine, the text is drawn beyond the borders of our text field boxes
      <Murat> Any ideas how I can fix this ?
      <Murat> Any alternatives ?

      This needs confirmation. If true, it could be another use for viewports as in https://codereview.qt-project.org/c/qt/qtdeclarative/+/282970 : maybe we don't need to clip if we limit the characters rendered to the rectangular area available. On the downside, redoing text layout while scrolling horizontally (e.g. using arrow keys to move the text cursor) could also be expensive; but sounds worth investigating.

      Attachments

        1. textinput.gif
          textinput.gif
          171 kB
        2. textinput.qml
          0.2 kB

        Issue Links

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

          Activity

            People

              srutledg Shawn Rutledge
              srutledg Shawn Rutledge
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes