PDA

View Full Version : [PyQt4][guiqwt] Dashed / dotted lines appearing as solid due to number of points



camposm
17th November 2015, 12:04
Hello everyone,

I'm developing an application at work for plotting and analyzing some data. I'm using PyQt4 for interface in general and guiqwt for creating the plots.
The problem is, the data has a very high point density and all line styles appear as solid:

11523

As i'm generating the curves with guiqwt's make.curve,


curve = make.curve(t, y, title=legend, linewidth=2, color=self.colors[color], linestyle=self.styles[style])

I've managed to "solve" the problem rewriting the functions drawLinesand drawCurve to use a QtGui.QPainterPath with QtCore.Qt.CustomDashLine instead of the original polyline (http://docs.huihoo.com/qwt/qwt__plot__curve_8cpp-source.html). Of course, this didn't work, as the CPU usage was very high with +5 curves (it can handle dozens and dozens, normally). How can I solve this?


Another problem I have, this one more obscure, is the window turning white. I start the application and everything seems ok. When I move the cursor over the icons, they turn white.. if I try to resize the window, everything turns white. The application is not frozen, if I click where 'open file' icon should be, it opens a white open file window.
This is fixed rebooting the computer, but after a while turned on, the problem returns. This is happening to only one computer, and I have no idea how to reproduce it on purpose.

Env:
Python 2.7
PyQt4
guiqwt 2.1.6
Application is compiled with PyInstaller 2.0

Any help is appreciated :) thanks in advance o/