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

QWidget * Q3TableItem::createEditor (  )  const [virtual]

This virtual function creates an editor which the user can interact with to edit the cell's contents. The default implementation creates a QLineEdit.

If the function returns 0, the cell is read-only.

The returned widget should preferably be invisible, ideally with Q3Table::viewport() as parent.

If you reimplement this function you'll almost certainly need to reimplement setContentFromEditor(), and may need to reimplement sizeHint().

See also:
Q3Table::createEditor() setContentFromEditor() Q3Table::viewport() setReplaceable()

Reimplemented in Q3ComboTableItem, and Q3CheckTableItem.

Definition at line 774 of file q3table.cpp.

References QLineEdit::setFrame(), QLineEdit::setText(), table(), and text().

Referenced by Q3Table::createEditor(), and updateEditor().

    QLineEdit *e = new QLineEdit(table()->viewport(), "qt_tableeditor");
    return e;

Generated by  Doxygen 1.6.0   Back to index