qt: Do not use QKeyEvent copy constructor
Summary:
This change is preparation for Qt 6, and it fixes an experimental build
with Qt 6.2.4 as copying of QEvent has been disabled in Qt 6.0.0 (see
19f9b0d5f54379151eb71e98555b203ad6756276 upstream commit).
This is a backport of core#580
Depends on D18139
Test Plan:
ninja all check-all
Run bitcoin-qt, open the RPC console, run a command (eg getblockchaininfo), then click in the middle of the screen and start typing another command, check that the text appears in the line edit. With the cursor in the line edit, check that the page up and page down keys affect the widget above that prints the result of the commands.
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D18140