Qt自制下拉列表

好学的学渣 2017-08-02 11:08:34
我想自制一个下来列表,但是遇到一个难题,就是点击其他地方的时候收起下来列表。求给个思路
...全文
162 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
trytry1992 2017-08-03
  • 打赏
  • 举报
回复
失去焦点事件
赵4老师 2017-08-03
  • 打赏
  • 举报
回复
SetForegroundWindow The SetForegroundWindow function puts the thread that created the specified window into the foreground and activates the window. Keyboard input is directed to the window, and various visual cues are changed for the user. The system assigns a slightly higher priority to the thread that created the foreground window than it does to other threads. BOOL SetForegroundWindow( HWND hWnd // handle to window to bring to foreground ); Parameters hWnd Handle to the window that should be activated and brought to the foreground. Return Values If the window was brought to the foreground, the return value is nonzero. If the window was not brought to the foreground, the return value is zero. Remarks The foreground window is the window at the top of the Z order. It is the window that the user is working with. In a preemptive multitasking environment, you should generally let the user control which window is the foreground window. Windows NT 5.0 and later: An application cannot force a window to the foreground while the user is working with another window. Instead, SetForegroundWindow will activate the window (see SetActiveWindow) and call theFlashWindowEx function to notify the user. Windows CE: The thread that owns the window is not given a priority boost. QuickInfo Windows NT: Requires version 3.1 or later. Windows: Requires Windows 95 or later. Windows CE: Requires version 1.0 or later. Header: Declared in winuser.h. Import Library: Use user32.lib. See Also Windows Overview, Window Functions,FlashWindowEx, GetForegroundWindow, SetActiveWindow

24,854

社区成员

发帖
与我相关
我的任务
社区描述
C/C++ 工具平台和程序库
社区管理员
  • 工具平台和程序库社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧