equal
deleted
inserted
replaced
3434 lineEdit->inputMethodEvents = 0; |
3434 lineEdit->inputMethodEvents = 0; |
3435 QInputMethodEvent event; |
3435 QInputMethodEvent event; |
3436 qApp->sendEvent(proxy, &event); |
3436 qApp->sendEvent(proxy, &event); |
3437 QCOMPARE(lineEdit->inputMethodEvents, i); |
3437 QCOMPARE(lineEdit->inputMethodEvents, i); |
3438 } |
3438 } |
|
3439 |
|
3440 scene.clear(); |
|
3441 QGraphicsView view(&scene); |
|
3442 QWidget *w = new QWidget; |
|
3443 w->setLayout(new QVBoxLayout(w)); |
|
3444 QLineEdit *lineEdit = new QLineEdit; |
|
3445 lineEdit->setEchoMode(QLineEdit::Password); |
|
3446 w->layout()->addWidget(lineEdit); |
|
3447 lineEdit->setAttribute(Qt::WA_InputMethodEnabled, true); |
|
3448 QGraphicsProxyWidget *proxy = scene.addWidget(w); |
|
3449 view.show(); |
|
3450 QTest::qWaitForWindowShown(&view); |
|
3451 QTRY_VERIFY(!(proxy->flags() & QGraphicsItem::ItemAcceptsInputMethod)); |
|
3452 lineEdit->setFocus(); |
|
3453 QVERIFY((proxy->flags() & QGraphicsItem::ItemAcceptsInputMethod)); |
3439 } |
3454 } |
3440 |
3455 |
3441 void tst_QGraphicsProxyWidget::clickFocus() |
3456 void tst_QGraphicsProxyWidget::clickFocus() |
3442 { |
3457 { |
3443 QGraphicsScene scene; |
3458 QGraphicsScene scene; |