Quantcast
Channel: Installation and Deployment
Viewing all articles
Browse latest Browse all 22112

Copy/Paste accelerators declared in VC++ table inactive in Qt widgets

$
0
0
Hi, I am working on a MFC application recently mixed with Qt 4.7.3/MFC migration framework 2.8.1. The MFC application resource file contains an accelerator table with standard Ctrl+C, Ctrl+V, Ctrl+X accelerators associated respectively to ID_EDIT_COPY, ID_EDIT_PASTE, ID_EDIT_CUT. All my Qt edition widgets derived from QLineEdit do not catch these accelerators except when there are used from a modal dialog (because Windows accelerators are not active in modal dialogs). After debugging inside the visible part of MFC, I found that CMDIFrameWnd::PreTranslateMessage (winmdi.cpp) calls ::TranslateAccelerator which returns TRUE and then prevents Qt from processing the keyboard message. If I remove these accelerators from the resource table, it works but that is not what I want because these accelerators are used in some other contexts (notably to copy/paste non-text data). Is this behaviour (or bug) well known or could it be a bug in my application (at MFC or Qt side)? And does anyone know a solution? Thanks in advance and regards. Pascal

Viewing all articles
Browse latest Browse all 22112

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>