PDA

View Full Version : A window on the bottom right of the screen...



Nyphel
7th March 2007, 15:45
Hello,

I would like to display a small window on the bottom right of the screen, il order to simulate a bubble on a TrayIcon (The Qt 4.2.2 TrayIcon have some bugs on Win2000, and they don't display de bublles correctly).

The idea would be to get the screen current resolution, in order to move the window at the appropriated coordinates (scree resolution - window size).
I've search on many forums, but I can't see how to get the screen current resolution...
And I don't know where to search :mad:.
I had a look to QtDesigner, in order to see if there isn't a property for my window that would anchor it on the bottom right, but there isn't ;).

Perhaps I could use the window that hold my TrayIcon and maximise it. The window size would give me the screen resolution... I think.

Have you got another idea ?

Thanks a lot :).

jpn
7th March 2007, 16:10
Maybe QDesktopWidget helps.

smacchia
7th March 2007, 16:19
QApplication::desktop()->screenGeometry(0) will give you the geometry of the screen. In X11, "0" is the display :0, you can pass 1, 2, however many displays you have.

HTH,
Susan

Nyphel
8th March 2007, 08:18
Thanks, I think this is the best solution :)