[Qt-interest] What is QDesktopWidget used for?
Frank Hemer
frank at hemer.org
Tue Dec 29 11:42:37 CET 2009
On Tuesday 29 December 2009 03:02:21 Kermit Mei wrote:
> 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?
Check the QApplication docs ...
Frank
More information about the Qt-interest-old
mailing list