Results 1 to 2 of 2

Thread: Processing huge QPainterPath

  1. #1
    Join Date
    Nov 2016
    Posts
    2
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Question Processing huge QPainterPath

    Hello everyone, I hope someone can help me with my problem.

    I try to render a huge QPainterPath (The PainterPath was created from an parsed File). I render everything on an QOpenGLWidget via QPainter. I have the problem, if the QPainterPath exceeds an certain complexity the QPainter start blocking the GUI. I tried "caching" as QPixmap or QImage (And still trying on this) but didn't got a usable result (Transparency gets lost).

    I can provide some simplified code of what I'm trying to do, but my first question is: Is there any other method of caching the QPainter or having a QThread rendering that part?

    Thankyou ~!


    Edit: I found out what the transparency-Problem triggers: if the QPixmap drawn via QPainter::drawPixmap is wider an higher than the QWidget transparency isn't rendered anymore. Is that a known problem or limitation I didn't found?
    Last edited by exi; 5th April 2017 at 16:58.

  2. #2
    Join Date
    Nov 2016
    Posts
    2
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Processing huge QPainterPath

    Hi,

    The transparency gets lost as soon height + width of the pixmap is greater then 8192px. Again, I can't find anything that describes that limitation but also found out getting to this limit also brings back the problem I liked to solve this way. So, back to the question: How to cache a Painter Path?

    Right now I have something like that, but with an more complex QPainterPath:
    video.h
    Every refresh would block the whole GUI.

Similar Threads

  1. Qt C++ huge memory leak
    By alenn.masic in forum Qt Programming
    Replies: 3
    Last Post: 3rd November 2012, 20:37
  2. QPainterPath::quadTo(...) calls QPainterPath::cubicTo(...) ?
    By brucelamond in forum Qt Programming
    Replies: 0
    Last Post: 29th April 2011, 00:30
  3. HUGE BUG in Windows Installation!!!
    By joandelason in forum Installation and Deployment
    Replies: 9
    Last Post: 22nd March 2010, 10:07
  4. Huge Text File
    By mcosta in forum Qt Programming
    Replies: 3
    Last Post: 11th January 2008, 20:23

Tags for this Thread

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.