Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. International
  3. Chinese
  4. Qt5的子QWidget对象调用winId()后父QWidget的下的nativeEvent()的WM_NCHITTEST无法响应
Forum Updated to NodeBB v4.3 + New Features

Qt5的子QWidget对象调用winId()后父QWidget的下的nativeEvent()的WM_NCHITTEST无法响应

Scheduled Pinned Locked Moved Chinese
winid wmnchitte
1 Posts 1 Posters 2.8k Views 2 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.
  • C Offline
    C Offline
    coolx
    wrote on last edited by
    #1

    我查找了帮助文档,但是没有找到相关的解决问题的信息。

    我在Win7系统下使用Qt5重绘自定义了Qt的对话窗口边框。
    其中重定义了QDialog的nativeEvent()函数。

    因为需要用到HWND本地窗口句柄,所以我调用了嵌在QDialog窗口中的子QWidget的 winId()函数。

    • 调用嵌在QDialog窗口中子QWidget对象的winId(),父QDialog重写的nativeEvent()可以响应其他消息,但就是不能正常响应WM_NCHITTEST、WM_NCLBUTTONDBLCLK等窗口消息。只要不调用子QWidget对象的winId(),就能正常响应那些那些消息。

    有人能帮忙看下这个问题吗?

    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