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

TextArea from Material theme is not properly clipped when used inside Flickable

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.11.3, 5.12.5, 6.2.2, 6.3.0 Feature Freeze
    • None
    • Debian 9, with website downloaded Qt 5.11.3 & 5.12.5
    • Linux/X11

    Description

      When using a TextArea inside a Flickable, while using the Material style, it is possible to have the text cursor show outside the Flickable.

      To reproduce:

      • compile below given code
      • type a text longer than the size of the TextArea
      • leave the text cursor at the end
      • scroll up with the mousewheel

       

      main.cpp:

       

      #include <QGuiApplication>
      #include <QQmlApplicationEngine>
      #include <QQuickStyle>
      
      int main(int argc, char *argv[])
      {
          QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
      
          QGuiApplication app(argc, argv);
      
          QQuickStyle::setStyle("Material");
      
          QQmlApplicationEngine engine;
          const QUrl url(QStringLiteral("qrc:/main.qml"));
          QObject::connect(&engine, &QQmlApplicationEngine::objectCreated,
                           &app, [url](QObject *obj, const QUrl &objUrl) {
              if (!obj && url == objUrl)
                  QCoreApplication::exit(-1);
          }, Qt::QueuedConnection);
          engine.load(url);
      
          return app.exec();
      }
      
      

      main.qml

       

       

      import QtQuick 2.11
      import QtQuick.Window 2.11
      import QtQuick.Controls 2.3
      
      Window {
          visible: true
          width: 640
          height: 480
          title: qsTr("Hello World")
      
          Rectangle {
              anchors.fill: parent
              color: "grey"
          }
      
          Flickable {
              width: 300
              height: 300
      
              TextArea.flickable: TextArea {
                  implicitHeight: 200
              }
          }
      }
      

       

      Expected behavior:

      Not see the cursor outside the TextArea (inline with the text disappearing)

       

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-83069
          # Subject Branch Project Status CR V

          Activity

            People

              qt.team.quick.subscriptions Qt Quick and Widgets Team
              svanderhorst Sander van der Horst
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes