I'm coming from memory on this so I may have details wrong (its been a couple of 
years).  It seems to me that one of the methods of either QCanvas or Qwidget returns 
the X11 Window* pointer.  If that's the case then use Aaron's suggestion of creating 
the class to wrap your code but let Qt create the window and get its pointer.  Then 
you can use X11 to draw into the Window with the bitmap with your own drawing commands.

I will try to find the method that I am referring to to get the Window* from Qt; 
however I can't do it tonight as I am busy.  Scan the docs for the QWidget and the 
QCanvas class; I know that I saw it!

----- Original Message -----
From: "Aaron J. Seigo" <[EMAIL PROTECTED]>
Date: Monday, July 7, 2003 2:13 pm
Subject: Re: (clug-talk) Need your guys advice

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On Monday 07 July 2003 02:33, Jane Young wrote:
> > We used Xlib to create a window showing the image pretty fast. 
> But now, we
> > need to add some widgets like menu, scroll bar, printing support 
> etc to the
> > image window which Xlib doesn't have.
> >
> > Which toolkit should I use? I tried some qt/x11 examples, like 
> showimg.> It's slow even for a 100k image.
> 
> were you using Qt's built-in image handlers, or were you using your 
> own image 
> handler? the reason i ask is that Qt's built-in image handlers are 
> known to 
> be slow and inefficient. there is work to improve that, but it 
> isn't 
> optimized for large image handling right now ... i'm guessing you 
> just used 
> the default showimg app as-is... 
> 
> in any case, there is probably no reason why you can't take your 
> Xlib 
> implementation and wrap it in a QWidget subclass and get the best 
> of all 
> worlds. after all, that's what all QWidgets do at the lowest level: 
> use raw X 
> calls via QPainter to draw things.
> 
> btw, i do Qt consulting if anyone's interested ;-)
> 
> wow. now THERE'S a shameless plug if i ever saw one.
> 
> - -- 
> Aaron J. Seigo
> GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43
> 
> KDE: The 'K' is for 'kick ass'
> http://www.kde.org       http://promo.kde.org/3.1/feature_guide.php
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux)
> 
> iD8DBQE/CdRU1rcusafx20MRAiE3AJ9okmpGXxBgT5ZvF5PMjejqbkkj/ACfUMz1
> HBTN4S/9BIe56ZHk3a1HKXU=
> =izb2
> -----END PGP SIGNATURE-----
> 

Reply via email to