How to display multiline text in QwtPlotMarkers with (Py)Qwt
Brought to you by:
rathmann
|
From: Gerard V. <gve...@gr...> - 2003-04-22 16:05:07
|
On Tue, 22 Apr 2003 16:27:46 +0200 Tomaz Curk <Tom...@fr...> wrote: > Gerard, > > great, this is even better. I have another question regarding the > markers. I would really like to be able to have multiple line labels in > markers. Currently this is not possible (\n characters are ignored and > nothing is drawn after that). Do you know if there is going to be done > something about this? > > Thanks, > Tomaz > Tomaz, this is a limitation of the QwtMarker.draw() function in the underlying C++ code. I do not think that it is very easy to translate/fix the void QwtMarker::draw(QPainter *p, int x, int y, const QRect &r) from the file qwt_marker.cpp into Python, because of access conflicts (some attributes are private). Nevertheless, if you succeed, I would like to see your code, because it may help me. In C++ it is probably easy to fix, but I do not promise anything (the Qwt developers want to implement rich text format for all text in QwtPlots, and I don't want a quick hack to interfere). It may be a good occasion to factor out common code for text display. Gerard PS: I advise you and your colleague(s) to subscribe to the qwt-interest list. You are asking questions that are of interest to other Qwt users (at least the answers). Also, there are people on that list that know more about Qwt than I do. PPS: I do not know how well rich text format is supported in Qt-2.3-NC, if you are using PyQwt-NC on Windows. |