You are not logged in.

1

Monday, May 28th 2007, 8:21am

Should I use Canvas,CanvasView, ScrollView or paintEvent?

Hello,

I am kind of confused about these knowledges: Canvas, CanvasView, ScrollView or paintEvent. If I am making some graphs shown on some widget, what should I consider to decide whether to use Canvas, CanvasView, ScrollView or paintEVent to add to the widget?

Thanks very much!

maverick_pol

Intermediate

  • "maverick_pol" is male

Posts: 364

Location: Lublin, Poland

Occupation: Student/C++ Developer

  • Send private message

2

Monday, May 28th 2007, 8:31am

Hi,

Which version of Qt are you using?
What kind of 'painting' you would like to use?
What do you want to 'paint"?


Maverick

3

Tuesday, May 29th 2007, 2:44am

Hello,

I am using QT 3.3....

I don't know what you want to know exactly about "what kind of painting you would like to use"... I can only say that I want to have the following effect:
Say there is a button on the main window, after I click on it, a big section reviews in the main window that contains a image. The image can be pretty big, even much bigger than the main window, so a scroll bar would be necessary.

About what I want to paint...hmm...I want to paint some 2D models that are generated according to user demand, like the user input some values and figures, a image should be generated accordingly, and I want to show that image.

Thank you

marceln

Beginner

Posts: 52

Location: Romania

  • Send private message

4

Tuesday, May 29th 2007, 4:59am

If you're using Qt4 switch top QGraphicsView/QGraphicsScene.

Should be fit for what you need.

Regards
Marcel

5

Tuesday, May 29th 2007, 5:30am

I know in qt 4 I can use QGraphicsview, but the problem is I am using qt 3.3 which doesn't support QGraphicsview.

And in the Paint system doc at the following address
http://doc.trolltech.com/4.2/paintsystem.html

it says that QImage is good for cross platform imaging, and QPixmap is good for printing. I want to do both: cross platform and printing. so which one of the QImage and QPixmap should I choose?

6

Tuesday, May 29th 2007, 5:50am

Ok...sorry for my last post...it seems like QPicture fits my need the most. However, qt 3.3 doesn't support QPicture. So I guess I will use QImage for screen combine Qprinter for printing paint device.

Thanks