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

Can not display IME when using QLineEdit in QGraphicsScene

XMLWordPrintable

      The simple test code is

      MainWindow::MainWindow(QWidget *parent) :
          QMainWindow(parent),
          ui(new Ui::MainWindow)
      {
          ui->setupUi(this);
      
          QGraphicsView *view=new QGraphicsView();
          this->setCentralWidget(view);
          QGraphicsScene *scene=new QGraphicsScene();
          view->setScene(scene);
          QLineEdit *edit=new QLineEdit();
          scene->addWidget(edit);
      }
      

      The problem is that it doesn't show the input method editor. But if I keep the focus on the QLineEdit, and minimize the window then restore it again, the IME just works fine. If I keep the focus on the QMainWindow, minimize it then restore it, the IME does not work, even if I focus on the QLineEdit again.

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

            Unassigned Unassigned
            popkc huang siyi
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes