PDA

View Full Version : about multithread



Pang
22nd June 2007, 04:18
hi, I want to use multithread drawing the map ( say fill palygons) for increasing the performance ,Each thread draw a section of the map.but i get the following error:
ASSERT failure in QPaintEngine::drawPolygon: "At least one drawPolygon function must be implemented". I don't know why? Is anyone help me. Thanks.

high_flyer
22nd June 2007, 09:02
can you post the paintEvent()? and if you are constructing your QGraphicsPolygonItems in a separate method, that too.

marcel
22nd June 2007, 18:06
You can't paint widgets from other threads. Is this what you're doing?:)

What you can do is determine the polygons coordinates from other threads(if this is an expensive operation, of course) and pass them to the GUI thread, and let it add the items to the graphics view.

Regards