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. QEvents and nativeEvents in Dll created widgets
Forum Updated to NodeBB v4.3 + New Features

QEvents and nativeEvents in Dll created widgets

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 549 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.
  • M Offline
    M Offline
    melongex
    wrote on last edited by
    #1

    The problem I am having is very specific, but I still hope that someone here can help me.

    I have the following situation: We want to provide QWidgets via Dll in an application (win32) that is not using Qt.

    The steps I am doing to achieve this are,

    1. In my DllMain I start a new Thread, which runs QApplication::exec
    2. There is a function in the Dll which will create a QWidget. To do this I send an event to the QApplicationthread, which will then create the widget

    If I use the external application the widget is indeed created (as a floating window, which is okay for now), BUT the widget is not reacting to user input: If I use a QPushButton, the button is not pressed by clicking on it, etc.

    First I thought, that the messages simply do not arrive at the widget, but the curious part is, that they do:
    When I overload the "nativeEvent" function, the widget receives all windows messages just fine.
    For me it seems that the windows messages are simply not translated to QEvents

    As a second test I tried installing an nativeevent filter for my qapplication, I never end up in this function, when clicking on the button.

    Edit: Btw, resizing the widget and moving it works just fine!

    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