[Qt-interest] How to draw a X11 Pixmap?
Dong Tiger
idlecat511 at gmail.com
Thu Mar 12 14:03:28 CET 2009
The old X error is solved. But theComponent->doSomethingWithPixmap(pixmap)
runs into another X error.
This component is actually Flash plugin 10 from Adobe. The error is
"BadDrawable (invalid Pixmap or Window parameter)".
2009/3/11 Dong Tiger <idlecat511 at gmail.com>
> Hi all,
>
> In my program, I have to create an X11 Pixmap, pass it to a component which
> draws on the pixmap, and then I draw the pixmap on a QPaintDevice.
> I have no much experience on X11 programming. My not-working code looks
> like:
>
> Pixmap pixmap = XCreatePixmap(QX11Info::display(),
> QX11Info::appRootWindow(), width, height, 24);
> // theComponent->doSomthingWithPixmap(pixmap);
> QPixmap qpixmap = QPixmap::fromX11Pixmap(pixmap,
> QPixmap::ExplicitlyShared); // X error here
> qainter->drawPixmap(0, 0, qpixmap);
>
> The program receives an X error at the line converting Pixmap to QPixmap.
> The detailed error message is "BadMatch (invalid parameter attributes)".
> Change depth from 24 to 32 has no effect.
>
> Do you know what's wrong with my code? TIA.
>
> --
> Tiger
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090312/476330e7/attachment.html
More information about the Qt-interest-old
mailing list