Logo Search packages:      
Sourcecode: qt4-x11 version File versions

QVariant QWidget::inputMethodQuery ( Qt::InputMethodQuery  query  )  const [virtual, inherited]

This method is only relevant for input widgets. It is used by the input method to query a set of properties of the widget to be able to support complex input method operations as support for surrounding text and reconversions.

query specifies which property is queried.

See also:
inputMethodEvent(), QInputMethodEvent, QInputContext

Reimplemented in QGraphicsView, QAbstractItemView, QComboBox, QLineEdit, QTextEdit, Q3IconView, Q3ListBox, Q3ListView, Q3Table, and Q3TextEdit.

Definition at line 6573 of file qwidget.cpp.

References QWidget::height(), and QWidget::width().

Referenced by QWidget::event(), QComboBox::inputMethodQuery(), Q3Table::inputMethodQuery(), Q3IconView::inputMethodQuery(), Q3TextEdit::inputMethodQuery(), QAbstractItemView::inputMethodQuery(), Q3ListBox::inputMethodQuery(), and Q3ListView::inputMethodQuery().

{
    switch(query) {
    case Qt::ImMicroFocus:
        return QRect(width()/2, 0, 1, height());
    case Qt::ImFont:
        return font();
    default:
        return QVariant();
    }
}


Generated by  Doxygen 1.6.0   Back to index