KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have the following UI, where the sonogram (freq+time sound representation) is shown. So the image is not loaded from somewhere, it is drawn by QPainter while reading WAV file. My current implementation is a single huge QImage object, where the image is drawn. And on paintEvent() , I draw part of the large QImage on the widget: QPainter painter(this); // (int, int, QImage*, int, int) painter.drawImage(0, 0, *m_sonogram, 0, m_offset); But, as i know, the QPixmap is optimized for displaying pixmaps on the screen, so should I convert the QImage to a QPixmap after the drawing of the sonogram is done? Also, is it worth to keep large image as some kind of a linked list of separate QPixmap objects of smaller size and make paintEvent() smarter to operate on a list of smaller objects to avoid Qt's auto-cutting procedures and so on? When my QImage is large enough, each paintEvent() consuming a lot of CPU . All kinds of advices are welcome :)
Tags (comma-separated)
Save Edits
Cancel