M
M
Mercury132015-12-09 19:06:35
Qt
Mercury13, 2015-12-09 19:06:35

How to make components on a form in Qt Designer handle keys?

I've put together some form through Qt Creator. Working on a Qt question : How do I make the editor in a table behave differently when Tab is pressed?
bool TableComboBox::focusNextPrevChild(bool next)- not called.
void TableComboBox::keyPressEvent(QKeyEvent * e)- not called.
I decided to try to get into the keyPressEvent of the table, but how? It was created in Qt Creator, you can’t change its type in any way ...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
Jacob E, 2015-12-09
@Mercury13

It's simple - create your own class, override what you need. Add a simple QWidget to the form and convert it to our class. Ready.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question