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. Qt and visual Studio extension
Forum Updated to NodeBB v4.3 + New Features

Qt and visual Studio extension

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 1.4k 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.
  • Y Offline
    Y Offline
    ycyclop
    wrote on last edited by
    #1

    I'm trying to write an extension to VS with Qt and I encountered a problem with mouse events:
    The location of the mouse event inside the widget are wrong.

    In QtWndProc it calls the function translateMouseEvent. There the global coordinates of the event are transferred to the widget coordinates. The final local pos is done by calling the function QApplicationPrivate::pickMouseReceiver. And the result is in local wrong coordinates
    The reason for this is that inside it tries to calculate by looking at the chain of parents of the widget we clicked inside until it reaches a window object. In VS this will not work because from a certain point the parent is no longer a Qt object but a generic HWND object

    I create the Qt widget in the CreatePaneWindow which is function in one of VS interfaces that need to be derived if you want to create your own Pane inside VS. I create a QWidget and give it VS supplied HWND as parent using win32 API.

    Is there a way to work around this so the correct mouse event location will be calculated?

    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