[Qt-interest] Howto grab window from X11 display other than applications display

venkat reddy venkat.961 at gmail.com
Wed May 25 13:00:28 CEST 2011


try below code

QPixmap screenPixmap=QPixmap();
QDesktopWidget* dektop=QApplication::desktop();
screenPixmap=QPixamp::grabWidget(dektop,dektop->rect());


-- 
Thanks&Regards,
Venkat Reddy pasya
Senior Software Engineer.
Sling Media Pvt Ltd.
Bangalore
Ph: 9620418382



On Wed, May 25, 2011 at 3:53 PM, Wilhelm <wilhelm.meier at fh-kl.de> wrote:

> Am 25.05.2011 00:27, schrieb Andreas Pakulat:
> > On 24.05.11 21:03:02, Wilhelm wrote:
> >> Hi,
> >>
> >> with QPixmap::grabWindow() i can grab the contents of windows on the
> >> applications display, say localhost:0.0.
> >>
> >> How can my application (connected to localhost:0.0) grab windows from
> >> another display e.g. localhost:1.0 ?
> >>
> >> I tried to use the code of QPixmap but with no luck due to the private
> >> headers in Qt.
> >
> > No idea wether X11 allows this at all, but you'll have to dive into the
> > X11 api to do this anyway. Qt does not have any way to do this.
>
> Ok, thank you.
> Now got it working using the conversion code from QPixmap_p and
> XGetImage().
>
> >
> > Andreas
> >
> > _______________________________________________
> > Qt-interest mailing list
> > Qt-interest at qt.nokia.com
> > http://lists.qt.nokia.com/mailman/listinfo/qt-interest
>
>
> --
> Wilhelm
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at qt.nokia.com
> http://lists.qt.nokia.com/mailman/listinfo/qt-interest
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110525/dedbf423/attachment.html 


More information about the Qt-interest-old mailing list