开发者

Using QT For Creating a Screen Dimmer

I'm trying to implement a screen dimmer using QT4 and I wanted some advice before I get cracking instead of going into this blindly.

I want to create a top-level window that has no frame. I was thinking of making the background black and messing with the opacity so that it will dim the screen out after the system is idle for a given period of time.

The problem with this is that if this window is always on top, how can I pass click events to the window underneath it? I'm not the least bit familiar with the windows API (the solution only has to work under window开发者_开发问答s), but I'm guessing that's a good place to start. Can anyone point me to some useful classes/functions or suggest another way of doing this via QT?


If anyone's interested in the solution I came up with and the windows API functions I used, you can check out my blog posting here: http://sarcastichacker.com/getnextwindowandgetforegroundwindow

I will be updating the source and making another related posting on the same blog within the next couple of days.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜