[Qt-interest] What is QDesktopWidget used for?
Kermit Mei
kermit.mei at gmail.com
Tue Dec 29 03:02:21 CET 2009
On Mon, 2009-12-28 at 14:03 +0000, Richard Moore wrote:
> On Mon, Dec 28, 2009 at 1:33 PM, Kermit Mei <kermit.mei at gmail.com> wrote:
> > What is QDesktop used for?
>
> QDesktopWidget represents the desktop itself, you shouldn't construct
> it directly instead use the factory method QApplication::desktop() to
> get one. Once you've done that you can use it to get the geometries of
> the various screens that are available. This is all covered in the
> documentation for the widget, see
> http://doc.trolltech.com/4.6/qdesktopwidget.html
>
> Cheers
>
> Rich.
Thanks, Richard.
In fact, I want to get the current active widget/window on my desktop
(or screen), so I used QDesktopWidget. But right now, I found that it
just used to get the geometries. Then, is there anyway to get the
current active window on the screen?
B.R
Kermit
More information about the Qt-interest-old
mailing list