Results 1 to 3 of 3

Thread: about multithread

  1. #1
    Join Date
    Sep 2006
    Posts
    12
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default about multithread

    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.

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: about multithread

    can you post the paintEvent()? and if you are constructing your QGraphicsPolygonItems in a separate method, that too.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  3. #3
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: about multithread

    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

Similar Threads

  1. Help me about multithread!
    By vql in forum Newbie
    Replies: 19
    Last Post: 8th February 2007, 15:01

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.