
Originally Posted by
pablo7
I think QKeyEvent is used when I utilize real keyboard, but in my case I'm using virtual keyboard
QKeyEvent is your solution.

Originally Posted by
pablo7
I don't know what event or function I have to use to call my function of QPushButton once instead of twice.
When you press a mouse left button on any part of this image. Say you clicked on "A". So, in mouse click event you have to do like this.
QKeyEvent keyEvent(QEvent::KeyPress, Qt::Key_A, Qt::NoModifier);
QApplication::sendEvent(parent->focusWidget(), &event);
To copy to clipboard, switch view to plain text mode
Using this approach, I also created a virtual keyboard. But I was using QToolButtons instead of an Image. Please see the attached screen shot.
Bookmarks