[Kde-games-devel] simple QGLWidget program

Kevin Krammer kevin.krammer at gmx.at
Mon Jan 26 19:33:26 CET 2004


On Monday 26 January 2004 19:25, Jan Bernatik wrote:
> Hi all
>
> I'm trying to learn QT. I started by reading Tutorials and examples from
> trolltech assistant which came with QT. I'm not using any KDE libs. at
> the moment, QT is just enough at the time :)
>
> I tried to do a simple think, paint triangle with QGLWidget. After like
> 3 days I'm not succesfull.

[code snipped]

> I know I'm not using any layout, frame or whatever, but I'm trying to
> display simple window with GLWidget and a triangle. Window opens,
> resizeGL works as supposed, but nothing is painted. I really don't know
> WHAT is wrong, if QGLWidget must be paced in some layout, cause If it's
> like this it should be the only => MAIN widget. If I understand.
> I did some programs using GLUT, and I want to switch to QT.
> (using glutswapbuffers() for drawing scene)

Try setting an initial size before showing the widget.
Something like
w.resize(600, 400);

Cheers,
Kevin

-- 
Kevin Krammer <kevin.krammer at gmx.at>
Qt/KDE Developer, Debian User
www.mrunix.de - Unix/Linux programming forum
www.qtforum.org - Qt programming forum
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: signature
Url : http://mail.kde.org/pipermail/kde-games-devel/attachments/20040126/2ce19d9a/attachment.pgp


More information about the kde-games-devel mailing list