PDA

View Full Version : Where is code file



safknw
9th May 2006, 14:12
I'm using Qt 4.1.2 free. with mingw onwindows.
I have created a form, perform connections.
I didn't find how create new slots, where to write code(form.ui.h ) and how to create main.cpp.
I done programming in Qt 3.x on linux. I want to port my code on windows.
:confused:
It seems trolltech has changed whole IDE.

wysota
9th May 2006, 14:32
http://qt4.digitalfanatics.org/tiqt/

mcosta
15th May 2006, 15:42
I'm using Qt 4.1.2 free. with mingw onwindows.
...
It seems trolltech has changed whole IDE.


In QT 4.x QDesigner it's only an interface designer and not an IDE.
See the QT web page to read why !

jimadamthwaite
14th June 2006, 07:49
In QT 4.x QDesigner it's only an interface designer and not an IDE.
See the QT web page to read why !

Lotsa questions. Downloading QT4 killed every thing QT-related. Nothing compiles.
Q1: Which QT web page is being referred to above?
Q2: What happened to Form1.h, .moc/xx, .obj/xx, .ui/xx etc?
Q3: What is now responsible for creating these, if they are still needed?
Q4: How do we get from .ui XML files to whatever is now used?
Q5: Or is QT4 to be used in conjunction with KDevelop or something else? If so, how?
Q6: Is there a simple step-by step example <!!!using the V4 GUI builder!!!>?
The (old) examples I have found so far rely on construction of the application UI "manually" by code, rather than drag & drop designer construction. Drag & drop is the reason I wanted to use Qt. It is often the only way I can force the layout I want.
Q7: When do we get a drag & droppable QCanvasView (or similar)? Is there any reason this cannot be done?

Jim Adamthwaite.

wysota
14th June 2006, 09:54
Lotsa questions. Downloading QT4 killed every thing QT-related. Nothing compiles.
Maybe you uninstalled Qt3? Qt4 doesn't replace Qt3.


Q1: Which QT web page is being referred to above?
Qt reference (http://doc.trolltech.com/4.1) about designer.


Q2: What happened to Form1.h, .moc/xx, .obj/xx, .ui/xx etc?
Nothing happened. What do you mean?


Q3: What is now responsible for creating these, if they are still needed?
The mechanism is still the same -- moc and uic create those.


Q4: How do we get from .ui XML files to whatever is now used?
UI files are still used. As I said before, the mechanism didn't change between Qt3 and Qt4.


Q5: Or is QT4 to be used in conjunction with KDevelop or something else? If so, how?
Yes, you have to use a 3rd party editors to write code.
How? Well, it depends on the editor/IDE you use. For KDevelop it is enough to assure qmake from Qt4 is earlier in the path than qmake from Qt3 and use KDevelop like you would work with Qt3 projects. Most features will still work.


Q6: Is there a simple step-by step example <!!!using the V4 GUI builder!!!>?
See the link in the second post of this thread. I'm sure there is something there. Additionally there is a video tutorial available for download from Trolltech site.


The (old) examples I have found so far rely on construction of the application UI "manually" by code, rather than drag & drop designer construction. Drag & drop is the reason I wanted to use Qt. It is often the only way I can force the layout I want.
I don't quite understand what you mean, but good for you! :cool:


Q7: When do we get a drag & droppable QCanvasView (or similar)?
In Qt4.2. It'll be called QGraphicalView.

Is there any reason this cannot be done?
The class is not ready yet. It'll be released with Qt4.2. As for Qt3 there was little use of QCanvasView put directly on a form as for most uses it had to be subclassed. But if you insist on using QCanvasView from Designer in Qt3, you might find wwWidgets interesting (http://www.qtcentre.org/component/option,com_weblinks/task,view/catid,23/id,32/).


BTW. It's "Qt" and not QT.

jimadamthwaite
14th June 2006, 12:26
I am running SuSE 10.0. I tried keeping Qt3 & downloading Qt4, nbg. Next I deleted all Qt stuff & installing Qt4 only, nbg. Next I reloaded Qt3 & 4 together. Having read more, I now understand that Qt4 will not do the .ui stuff I was used to in Qt3. I am still hoping that less is more. I have yet to work out the intricacies of uic & moc, I did not need to know this before. The tutorials do not say. Still reading.

I spent a LOT of time hunting around Trolltech & qtcentre FAQ's looking for something helpful & found that several people were effectively balked by the same lack of explicit info on how to get a simple Qt4 GUI-built app up & running.

None of the doc's I have read on Qt4 give the same kind of explicit blow-by-blow detail that is to be found in the Qt3 'Metric" conversion calculator. The "Getting started with Qt Designer" manual that comes with Qt4 contains no such info, for all the hard work which was obviously put into it.

The absence of a few document lines like:

Now create a project file named "mytutorial3.pro" and edit it to contain:
...........
If you are using Windows XP it should look like:
...........
Note that this only needs to be done once. Now enter the shell command line:
qmake xxxx
to create the files xxxx which....

...can cost days of frustration & probably cuts your Qt audience in half due to discouragement. This sort of thing can be a show-stopper. I know a few tech-people who will not change to Linux as a development environment because of "gappy" literature. Typically an expert (you) does not know just how much he/she knows, and therefore does not know what can be safely assumed or worked around.

The tutorial must work, using only the info given on the tutorial page with minimal assumed knowledge or other resources. The Qt3 Color Tool tutorial relied on file "tabwidget.png" which was not in my Qt3 release, nor easily found on the web. Several people enquired about this on Trolltech's forum, without answer.

The tutorials must clearly state which Version of Qt should be used. You might have a tutorials page with categories like:
Tutorials for Qt3.x
Tutorials for Qt4.x
Tutorials for Qt2...Qt4

I offer myself as an untrained monkey to review tutorials & take notes on the areas of difficulty. I can submit the notes and suggest additions which might clarify. This can only work for a while as I would soon start to become a trained monkey. The baton must then be passed on to other newcomers.

I imagine that tutorial lengths will only be increased by 5 to 10 per cent, but your queries should reduce by a greater amount. Notice how many queries are just re-wordings of the same problems. This is a sure-fire indicator.

I can be contacted at "secad AT netspace dot net dot au". I can start straight away on an informal (irregular after hours) basis. I am determined to see Planet Qt spin. I presume that revisions to Qt docs are legally permissable and that you have a way of updating the online versions and the time to do so.

Thanx for your time,
Jim Adamthwaite

jacek
14th June 2006, 15:22
I am running SuSE 10.0. I tried keeping Qt3 & downloading Qt4, nbg. Next I deleted all Qt stuff & installing Qt4 only, nbg. Next I reloaded Qt3 & 4 together.
In PLD Linux (Th) all Qt4 modules are available as packages and they can coexist with Qt3 without any problems. Also I have never experienced any problems with compiling Qt4 from sources --- all you have to do is to follow instructions in the INSTALL file.


Having read more, I now understand that Qt4 will not do the .ui stuff I was used to in Qt3.
Could you explain that? Qt4 can do everything Qt3 could do and even more.


I have yet to work out the intricacies of uic & moc, I did not need to know this before.
Actually you had to know something about them to use Qt3. qmake will handle moc and uic for you, just as in Qt3.


Several people enquired about this on Trolltech's forum, without answer.
What "Trolltech's forum"? AFAIK Trolltech runs only mailing lists.


The tutorials must clearly state which Version of Qt should be used.
Qt4 docs contain only Qt4 tutorials (http://doc.trolltech.com/4.1/examples.html).


I presume that revisions to Qt docs are legally permissable and that you have a way of updating the online versions and the time to do so.
This site is run by the community, if you want to make changes in the official Qt documentation, you will have to contact Trolltech.

If you want, you could contact Johan Thelin (the author of The Independent Qt Tutorial (http://qt4.digitalfanatics.org/tiqt/index.html)) --- I'm sure he will be interested in your feedback.

gfunk
14th June 2006, 20:55
I believe Jim has some good points. Being as I have started out, and only been working with the Win XP version so far, I see lots of places where the documentation tries to explain multiple platforms at once.

For instance, the documentation has many references to using qmake or QT += sql or QT += opengl. If you're using Win XP, you don't ever need to touch the qmake tool or edit the .pro file. To even talk about it can be misleading to the Windows programmer; he may try to edit the .pro file, not knowing that the VS integration mostly handles all that stuff already.

It would be nice to know about the gotchas and pitfalls of using the VS integration though - while it has been very easy to use, the documentation for it has been fairly scant, so you have to rely on a lot of programmer's intuition.

It would be nice to have specific sections for platform-specific details of Qt. Or maybe I just haven't found those sections yet.

jacek
14th June 2006, 21:11
If you're using Win XP, you don't ever need to touch the qmake tool or edit the .pro file.
Only if you use VS integration. It won't help you much if your program must work on more than one platform.


It would be nice to have specific sections for platform-specific details of Qt. Or maybe I just haven't found those sections yet.
Look for "Window System Specific Notes" in Qt Assistant.

wysota
15th June 2006, 00:00
For instance, the documentation has many references to using qmake or QT += sql or QT += opengl. If you're using Win XP, you don't ever need to touch the qmake tool or edit the .pro file. To even talk about it can be misleading to the Windows programmer; he may try to edit the .pro file, not knowing that the VS integration mostly handles all that stuff already.

Please remember that VS integration is only available for commercial users. It would be unwise to forget about the rest of them.

gfunk
15th June 2006, 00:10
I'm not saying to forget the users, I'm saying to actually address *all* of them, specifically and separately. As cross-platform as Qt may be, there are still certain quirks from platform to platform, and it is not easy to categorically search for and identify what these differences are, unless you happen across it by chance somewhere in the documentation.
I believe http://doc.trolltech.com/4.1/winsystem.html is a good start, but it just scratches the surface.

wysota
15th June 2006, 00:17
There is a person in Trolltech who is directly responsible for maintaining the docs. I can't tell you the exact address, but you can report your doubts about the manual to qtbugs (I think the address is qtbugs<at>trolltech.com but you can use the tasktracker too).

jimadamthwaite
15th June 2006, 01:27
--- all you have to do is to follow instructions in the INSTALL file.

I installed an RPM via SUSE's yast2, making it hard to know where things should end up. One page explicitly showing the preferred dir structure and environment variables for EACH OS variant you support would be really helpful. I imagine for example, that SUSE & Trolltech consult on such matters.


Qt4 docs contain only Qt4 tutorials (http://doc.trolltech.com/4.1/examples.html).

I was referring to the need for tutorials USING the drag & drop designer rather than constructed in code. (As in http://doc.trolltech.com/4.1/tutorial-t1.html).

These tutes, while interesting, lets things fall where they may on the window depending on one's level of understanding of non-obvious "nudging" control features, and do not translate easily to a real-world app which WILL be done using the designer.

Fer instance, after successfully doing the cannon tute series (in Qt3), I still can't work out how to make an application of my own to get a canvasview item to appear on THE form as designed within the GUI designer. It appears in its own separate window #2, with the rest of the GUI widgets appearing in window #1. The cure is probably embarrassingly simple, if I could find it. This has cost days. Rabid application development indeed.


What "Trolltech's forum"?
http://lists.trolltech.com/qt-interest/
A rose by any other name... and the user queries regarding "tabwidget.png" were still unanswered last time I looked.


Could you explain that? Qt4 can do everything Qt3 could do and even more.

An example for a recommended modifcation to "The Independent Qt Tutorial - Qt 4 Edition", the files where copied & pasted from the tute page:

2.3. The Class Implementation

In the last section we skipped over the implementation of the number holder class. As the class is trivial, the main part of the implementation is not that very interesting.

This should read:

2.3. The Class Implementation

We now present the implementation of the number holder class. It is to be placed in a file called "numberholder.cpp". The contents are as follows:

// Constructor
NumberHolder::....... etc.

The justification for such a pedantic approach is that the people doing these exercises are most likely beginners at C++, are also beginners at Qt, probably a Linux newbie, and have a new & possibly incorrect Qt installation or configuration. The tutorial must remove as much uncertainty as possible to allow debugging.

In my case, when making the numberholder tutorial, the following occurs:
bash: qmake -project
OK so far.
bash: qmake
Still OK.
bash: make
We get:
g++ -c -pipe -fno-strict-aliasing -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_SHARED -I/usr/share/qt/mkspecs/default -I. -I/usr/include/QtGui -I/usr/include/QtCore -I/usr/include -I. -I. -I. -o main.o main.cpp
numberholder.h:3: error: expected class-name before ‘{’ token
numberholder.h:4: error: ‘Q_OBJECT’ does not name a type
numberholder.h:15: error: expected `:' before ‘slots’
...20 more error lines...
main.cpp:14: error: within this context
make: *** [main.o] Error 1

The error line:
numberholder.h:3: error: expected class-name before ‘{’ token

...implies that QObject is not recognised, and the rest follows logically from whatever caused that. I may have an installation error - possibly a missing library, PATH or other environment problem. Since I added Qt4 that is. Still looking at that.


This site is run by the community, if you want to make changes in the official Qt documentation, you will have to contact Trolltech.

If you get one query, answer it as you deem appropriate. A second similar query identifies a doc gap. Soon you will get the third query.


If you want, you could contact Johan Thelin (the author of The Independent Qt Tutorial (http://qt4.digitalfanatics.org/tiqt/index.html)) --- I'm sure he will be interested in your feedback.

Roger willco, and thank you for your time & patience.

jacek
15th June 2006, 02:41
I installed an RPM via SUSE's yast2, making it hard to know where things should end up. One page explicitly showing the preferred dir structure and environment variables for EACH OS variant you support would be really helpful. I imagine for example, that SUSE & Trolltech consult on such matters.
Unfortunately it's not that easy --- each Linux distribution has its own rules. Especially when it comes to directory structure (hopefully FHS and LSB will become popular over time). It's impossible for a software developer to make the software work on every Linux distribution --- people that make those distributions are responsible for that. Software developers can only make their software work in a few chosen environments.


I was referring to the need for tutorials USING the drag & drop designer rather than constructed in code. (As in http://doc.trolltech.com/4.1/tutorial-t1.html).
What about Qt Designer manual (http://doc.trolltech.com/4.1/designer-manual.html)? If you want to learn Qt you must understand how it works and you won't learn it by using only Qt Designer. If you are a programmer most of the time you will be writing code --- not dragging & dropping.


These tutes, while interesting, [...] do not translate easily to a real-world app which WILL be done using the designer.
What about Using a Component in Your Application (http://doc.trolltech.com/4.1/designer-using-a-component.html) and Subclassing and Dynamic Dialogs (http://doc.trolltech.com/3.3/designer-manual-6.html)? Actually Qt Designer is only a layout editor --- together with uic it can generate some code for you, that you would have to write yourself otherwise. You can treat it as a form of code generator. There's an excellent book on programming titled "The Pragmatic Programmer". Authors advise not to use any wizards for generating code, if you don't understand that generated code.

You must understand the basic mechanisms that make Qt work. Qt is not only a Qt Designer --- it's a framework, this means that it will affect all of your code. Qt Designer only handles the creation and positioning of widgets (the most tedious and time consuming part of GUI programming). The rest you must write yourself.


Fer instance, after successfully doing the cannon tute series (in Qt3), I still can't work out how to make an application of my own to get a canvasview item to appear on THE form as designed within the GUI designer.
That's because it can't be done in Qt Designer. You must write few lines of code that will add an item to the canvas. If you have any specific questions in this matter feel free to ask them in a new thread.

To be honest, two years ago I knew nothing about Qt. All I had was Qt docs and The Independent Qt Tutorial (http://www.digitalfanatics.org/projects/qt_tutorial/). Yet I was able to port my application from wxWidgets to Qt in two weeks (it was a simple optical simulator with QCanvasView as the main GUI component).


If you get one query, answer it as you deem appropriate. A second similar query identifies a doc gap. Soon you will get the third query.
Yes, but you must understand that we are not Trolltech and we are not responsible for Qt documentation. We just offer free help, because we like Qt and we like to help others.

jacek
15th June 2006, 03:09
The justification for such a pedantic approach is that the people doing these exercises are most likely beginners at C++, are also beginners at Qt, probably a Linux newbie
IMO one should learn one thing at a time. You are right that tutorial authors shouldn't overestimate the readers' knowledge, but you just can't learn 3 different things at the same time (and if you try to do that, you can't blame the author).


The error line [...] implies that QObject is not recognised, and the rest follows logically from whatever caused that.[...] Still looking at that.
Do you have #include <QObject> at the beginning of numberholder.h?

jimadamthwaite
15th June 2006, 04:16
IMO one should learn one thing at a time. You are right that tutorial authors shouldn't overestimate the readers' knowledge, but you just can't learn 3 different things at the same time (and if you try to do that, you can't blame the author).

I think you are right there. I am trying to read stuff from all over the place, it could hardly be called systematic. My apologies for "firmness of voice".


Do you have #include <QObject> at the beginning of numberholder.h?

No, I did not spot that one. Where was it? Dang sure fixed it real purdy good-like. I wonder whether this tute was so simple that noone ever tried to do it. I would have read it, nodded my head and moved on, it was desperation that drove me to start at the bottom (C++ tute) and do every little step.

Thank you again. The journey continues...

wysota
15th June 2006, 08:40
Sorry to cut into the discussion :)

If you take a closer look at resources related to Qt (like Qt manual, this forum and probably others too), you'll notice that everywhere they advise you to learn C++ before starting with Qt. The reason is very simple -- Qt is not some "magic box" where you put a few building blocks and you have a ready-to-sell application. Of course for some simple apps this is true, but not for ones which actually do anything. It is also true that you can get away without knowing C++ and still be able to develop applications with Qt just by asking questions on forums like this one, but you won't be able to understand the code and know what it is really doing. It's like putting a monkey in front of a TV -- it'll start to mimic things it sees in the tv, but won't be able to go beyond that. C++ techniques (very often quite advanced ones) are used extensively throughout Qt-enabled programming and I fully understand Johan who doesn't write bodies of most simple classes. There are many tutorials and books on C++, you don't have to learn it by reading a Qt tutorial -- if you really need help with implementing classes, OOP tutorials are there to help you.

To be honest I hate tutorials "we now press the second button from the left in the sixth row from the bar of icons and choose a file called something.cpp". If someone can't comprehend a "please open the file you previously saved" instruction, I doubt he/she will be able to do anything serious with Qt or any other technical device without "reaching the next level of consciousness".

jimadamthwaite
15th June 2006, 19:19
Well said. But we have to start the adventure of learning somewhere.

There is a zen saying (paraphrased) about the stages of learning.
1. Those who do not know that they do not know.
2. Those who do know that they do not know.
3. Those who do know that they do know.
4. Those who do not know that they do know.

Level 1 people are unaware of the existance, importance or size of a field.
Level 2 people are aware of the field but do not have standalone competence.
Level 3 people have reached good proficiency and are suited to teaching 1's & 2's.
Level 4 people have reached the highest guru levels and can only teach 3's. They automatically correctly perform level 2 stuff at an intuitive level and have forgotten what it was like.

I am at approx. Level 2.4 on Qt/C++/Linux and trying to raise that to Level 3. I think should be attainable if I spend a year of evenings at it reading everything I can get my lunch-hooks on and trying to think in C++. So where better to start than The Correct C++ Tutorial for Qt4?

I understand the difficulty of writing doc's. I've done a few. After completing a complex project one stumbles gasping across the line while offering the project disk with quivering outstretched hand, to be asked "OK, now what about the user manual?". It's not easy to summon the same level of energy for it. Unpaid, even a saint finds it taxing.

As to the level of audience to pitch a tutorial lesson series at, I imagine that only the first lesson would need to cover low level stuff like "click the third button" along with an explanatory paragraph. Once the user has identified the button and understands why it was to be clicked, subsequent lessons can pass lightly over this detail. The art is to make each step of the staircase of a climbable size, with no omitted or cracked treads.

I guess traditional lecturer/student arrangements have the advantage that the student can ask for clarification as needed. Uncertainty need gnaw for only seconds rather than days and the lecturer can revise the lesson for next term's students. This arrangement is expensive of course. Books and web resources are cheaper but require more dedication from the student.

A typical scenario:
- User decides "I need to display a string on the screen".
The book then sez:
- For simple strings which do not change much in length, use a Label. To read, write or reposition the label the useful setters and getters are... . For more elaborate features like font changes or controlling visibility refer to QLabel in...
- For strings which may change significantly in length or require direct user input use a QEditLine. An example may be found at... The string is stored internally as.. and may be manipulated with the normal functions for that class such as... .
- For multi-line text use a .... Examples can be found at... and so on.

Much of this info is in the class description notes, but one needs to somehow know which class is likely to be the goldmine. This is not as easy as it might sound. A list of hundreds of classes, many of which can require over an hour of reading, presents a formidable task if you are not familiar with them. A single paragraph could over come this. Quite often only a combination of classes is meaningful, such as a canvas and canvas view or a pixmap and painter. A means of mapping typical tasks to likely candidate classes would be really really good. Really. Good.

Anyway, it is time for me to get on with the tutorial. I still think it's aimed about right, it explained a few points which had nagged me for weeks. They were points to which I could find no reference to in the large amount of Qt docs I have hunted through. With the work already done by Johan Thelin and suggestions from any/all of us, it could become a significant Qt guide. It is needed for those who follow.

Thank you all for your contributions. It's still fun.

wysota
15th June 2006, 20:39
To be honest the best way to learn Qt is to sit down and do something simple with it ("Hello world" is a good thing to start with). Then add something more complex, etc. No tutorials needed. Of course all this applies if one already knows C++.

jacek
15th June 2006, 21:04
I think should be attainable if I spend a year of evenings at it reading everything I can get my lunch-hooks on and trying to think in C++. So where better to start than The Correct C++ Tutorial for Qt4?
The whole year is far too much, you don't have to be a C++ guru, but you must understand how C++ works. Qt is built on top of C++ and there is no way you can grok it without knowing C++. I don't think that there's any on-line tutorial as good as books on C++. My personal favorite is "C++ Primer" by Lippman and Lajoie, but there are other books (http://www.qtcentre.org/forum/f-c-programming-9/t-what-are-your-favourite-c-books-29.html) too.


A list of hundreds of classes, many of which can require over an hour of reading, presents a formidable task if you are not familiar with them.
Yes, but you can search the docs quite easily with Qt Assistant and there is a number of articles that describe Qt's internals and how its classes interact with each other. You can find the whole list here (http://doc.trolltech.com/4.1/overviews.html).

jimadamthwaite
16th June 2006, 01:29
To be honest the best way to learn Qt is to sit down and do something simple with it ("Hello world" is a good thing to start with). Then add something more complex, etc. No tutorials needed. Of course all this applies if one already knows C++.

I've already done a dozen Qt tutes. It mostly make perfect sense to me even though my brain has probably been damaged by assembly programming. I can usually visualise the underlying code & structures and even why it is the way it is. I am happy with signals, slots, inheritance, overloading, and so on. I have already written a few working Qt apps for various things, one of which entailed writing a C interpreter (in C++) for industrial PLC control. I've written graphic packs (point, line, circle, ellipse etc.) in 2650, Z80, 6809 & 68K. I am just having trouble guessing the way it is done in Qt. Throwing a painter at a pixmap does not seem a guessable act.

I often find this level of info is missing, causing long delays while I try to deduce what QThingy might help, or even if one exists. You surely know the problem - e.g. you need to already know that a certain function exists, its name, and the name of the header file to #include. Without already knowing that much the function does not exist in your inner world model and you cannot use it until you stumble upon it. It borders on a philosopy problem. The only way I've found to handle this is to read include files during spare moments.

The current task involves 3D coordinate rotations & translations for navigation, so I want to look at the result as a picture. I've done the cannon tute, the butterflies & a few other QCanvas exercises. I have modified them to satisfy myself about various details. I even have the new app working showing a nice little 3D axis with direction pointers & local horizon. I just wish I could get the canvas view to appear on MY window along with the other widgets instead of appearing in its own unintended window. None of the drawing tutes seem to address this as they do not use the GUI designer.

In those tutes the widgets seem to fall where they may according to rules which I cannot deduce. I must use the GUI designer as I do not know how to force my screen layout to be what I need using size hints & various nudging mechanisms. I would lose all the nice auto-layout springs & things. That's why Trolltech invented the designer. The frustration comes from the inner certainty that the fix will be just a few lines of code, but will take a few days to find.

Ah well, keep plugging.

e8johan
20th June 2006, 11:08
What you describe is not exactly a Qt-specific issue. You need to know what to expect when working with any toolkit. If you want a tutorial between the Cannon (http://doc.trolltech.com/4.1/tutorial-t1.html) and the Qt Reference Docs (http://doc.trolltech.com/4.1/), I would like to recommend the Independent Qt Tutorial (http://digitalfanatics.org/projects/qt_tutorial/). It it I try to demonstrate many of the common Qt classes - including painters, canvases and OpenGL.

As for the painter - pixmap relation when drawing - that is just plain OO. You'll get used to it - I promiss!