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

QGraphicsScene and QTextEdit.

    XMLWordPrintable

Details

    Description

      When QTextEdit is used inside a QGraphicsScene, the vertical cursor is not blinking when the TextEdit has the focus.

      Example code:

      Click in the center of the QTextEdit, the blinking cursor is not shown.

      #include <QApplication>
      #include <QtGui>
      #include <QWebView>

      int main(int argc, char** argv)
      {
      QApplication app(argc,argv);

      QGraphicsScene scene;

      QGraphicsWidget *textEdit = scene.addWidget(new QTextEdit);

      QWebView *webView = new QWebView();
      webView->load(QUrl("http://doc.trolltech.com/4.4/qwebview.html"));
      webView->setFixedSize(1000, 1000);

      QGraphicsWidget *gWebView = scene.addWidget(webView);

      QGraphicsLinearLayout *layout = new QGraphicsLinearLayout;
      layout->addItem(gWebView);
      layout->addItem(textEdit);

      QGraphicsWidget *form = new QGraphicsWidget;
      form->setLayout(layout);
      scene.addItem(form);

      QGraphicsView view(&scene);
      view.show();
      return app.exec();
      }

      Attachments

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

        Activity

          People

            bjnilsen Bjørn Erik Nilsen
            xcm Martin Petersson (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes