I have a textedit named txtedit... and I have a sendbutton. But I have 3 of each in separate tabs.

I usually do:
sendbutton->setShortcut(Qt::Key_Enter);
sendbutton2->setShortcut(Qt::Key_Enter);
sendbutton3->setShortcut(Qt::Key_Enter);

What I really want to do is, make all the txtedit's shortcut as the button.
In other words, when a guy clicks on a txtedit types a message and then presses enter, it sends the message.
So far, it's failing. Any other method? Perhaps I need to use connect()?

Thanks for help.