-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wednesday 30 July 2003 12:07, Jane Young wrote:
> If I don't have a.exec(), the image still shows in qt gui window, operation
> control works but doesn't have menu bar.
>
> I didn't wrap my xlib code into QWidget, should I do that? and why?

Quick Thought
===========
QApplication::exec results in the Qt event loop starting which drives all the 
Qt interface components (obviously =). this means Qt processes the X events 
for its widgets (such as your main window). when you don't exec your 
QApplication, then the events aren't processed by Qt (and Qt widgets like the 
menubar won't work) which allows them to get through to your widget.

you could wrap your Xlib widget in a QWidget, or you could subclass 
QMainWindow (if you haven't already) and do manual event filtering within it 
to pass events manually to your Xlib widget. manual event flitering is a pain 
=)

Better Thought
===========
if you want good, free Qt support, i'd suggest subscribing to and posting on 
the qt-interest email list. there are likely more Qt developers there than on 
clug -talk ;-)

- -- 
Aaron J. Seigo
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux)

iD8DBQE/KBUQ1rcusafx20MRAogfAJ47/DBbFqDY5zEMSAY62rtvvzcSWwCeOhDe
xYh+f8clUzTs8TkjrHNT094=
=J9Q+
-----END PGP SIGNATURE-----

Reply via email to