Latest

Archive

Community news

C++

Communities and Content

Databases

Editorials

Emacs

General

HTML

Java

Notices

PHP

XML

Apache

C++

Database

General

HTML

Java

Javascript

Linux

Object oriented programming

Open source

Perl

PHP

Python

Ruby

SOAP

XML

Suggest a link

Advertise on zez

Contribute

Contact us

About zez


Creating games with QCanvas




Main


main.cpp is simple, like in most Qt applications. We create a QApplication object and a BounceWidget object. We set the window caption, and that's about it.


int main( int argc, char **argv )
{
    QApplication a( argc, argv );

    BounceWidget bw( 0, "BounceWidget" );
    a.setMainWidget( &bw );
    bw.setCaption( "Astrophysics for beginners!" );
    bw.show();

    return a.exec();
}


Voila! A bouncing globe!

Attached files:


<< Previous page | 1 | 2 | 3 | 4 | < 5 > | 6 | Next page >> | Printer-friendly page |

Comment List


Topic: Author:
Time:
Very much Informative Riphat satti 29.08.2007 10:47

I think this is very useful exapme to learn about qcanvas..

each and every thing describe in full detail.
a layman can easily understand this example.


Bounce Canvas Demo Dr M 15.05.2005 05:57

Bounce is a very nicely written demo.
I wish QT would also distribute it
on their CD as an example on how to
write a QCanvas Application.

The example given in the QT book is
way too much for a newcomer.


Very usefull Arun Sivakumar 01.12.2001 17:18

The article featuring the QCanvas was really usefull and simple to understand. Hope you release more article covering various other features of Qt.

Please do inform if there are any other site with equally good articles on Qt.

Thank you
s_arunn@yahoo.com




Forgot your password?

Register a new user

Results

Polls