Details
-
Bug
-
Resolution: Done
-
P2: Important
-
4.6.2
-
None
-
Mac Snow Leopard.
-
b2e9757b6481be20485d4a36f2d74ea919ff8833
Description
The easiest way to see this is with $QTDIR/examples/mainwindows/dockwidgets/
change the pro file (to be sure):
CONFIG -= x86
CONFIG += x86_64
Then build and run. It is not possible to move the selection of either of the lists on the right with the keyboard when using one of the Japanese Input Sources.
The following example also shows the problem:
(add to pro file : ) CONFIG -= x86 CONFIG += x86_64 (main.cpp) #include <QtGui> class MyWidget: public QWidget { Q_OBJECT public: MyWidget(QWidget *parent = 0); protected: bool event ( QEvent * event ); private: QHBoxLayout *layout; QListWidget *lw; }; class MyListWidget: public QListWidget { Q_OBJECT public: MyListWidget(QWidget *parent = 0) : QListWidget(parent){}; protected: bool event ( QEvent * event ); }; bool MyListWidget::event ( QEvent * event ) { if (event->type() == QEvent::KeyPress) { qDebug() << "== Key Press@MyListWidget"; } else if (event->type() == QEvent::KeyRelease) { qDebug() << "== Key Release@MyListWidget"; } return QListWidget::event(event); } MyWidget::MyWidget(QWidget *parent) : QWidget(parent) { setWindowTitle("Support Tester"); layout = new QHBoxLayout; lw = new MyListWidget; // changed create object from QListWidget to MyListWidget by sra layout->addWidget(lw); QStringList list; list << "1" << "2" << "3" << "4" << "5" << "6"; lw->addItems(list); setLayout(layout); } bool MyWidget::event ( QEvent * event ) { if (event->type() == QEvent::KeyPress) { qDebug() << "Key Press@MyWidget"; } else if (event->type() == QEvent::KeyRelease) { qDebug() << "Key Release@MyWidget"; } return QWidget::event(event); } //This moc include is to get everything in a single file - for quick testing only #include "main.moc" int main(int argc, char *argv[]) { QApplication app(argc, argv); MyWidget *myWin = new MyWidget(); // myWin->show(); //this works as expected. // myWin->raise(); MyWidget *myWin2 = new MyWidget(); QMdiArea *mdi = new QMdiArea(); mdi->addSubWindow(myWin2); mdi->show(); return app.exec(); }