QT如何检测系统托盘区域以创建系统弹出窗口 [英] QT how to detect the systray area for creating systary pop up windows

查看:258
本文介绍了QT如何检测系统托盘区域以创建系统弹出窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要创建/设计QT系统托盘弹出窗口,我正在考虑创建自定义窗口, 派生自QDialog,因此它比普通的信息,警告,关键样式"更好看.
我的问题是我如何检测桌面系统托盘的位置,那么如何给弹出窗口
系统托盘弹出窗口的外观

i need to create/design QT systray popup windows , i was thinking about creating custom windows that derived from QDialog , so it could look better then the ordinary "Information,Warning,Critical styles"
my question is how can i detect the position of the desktop systray ,so how could give the popup windows
the look and feel of a systray popup

推荐答案

您可以使用QSystemTrayIcon::geometry()给定的矩形来精确地了解桌面系统托盘的位置.几何方法给出了系统任务栏图标在屏幕坐标中的位置.

You might use the rectangle given by QSystemTrayIcon::geometry() to know precisely the position of the desktop systray. The geometry method gives the position in screen coordinate of the system tray icon.

有关更多信息,请参见文档.

See the documentation for more information.

这篇关于QT如何检测系统托盘区域以创建系统弹出窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆