Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Copy/Paste accelerators declared in VC++ table inactive in Qt widgets
Forum Updated to NodeBB v4.3 + New Features

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

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 1.2k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    pinchoonet
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved