On Sun, Feb 27, 2011 at 3:27 PM, Darren Dale <dsdal...@gmail.com> wrote:
> Hi Pierre,
>
> Are you still maintaining the qt4 plot editor dialog? It doesn't
> appear to be working properly: setting the marker and linestyle
> options does not effect the plot (tested on Ubuntu Natty alpha, with
> the v1.0.x branch on python-2.7 and PyQt4-4.8.3).

Sorry, I think this was a mistake on my part...

> I have a really hard
> time following the code.

... but I do have a really hard time understanding the code.

> Also, the dialog makes the qt4 backend
> unusable with PyQt4's API v2, which does not provide a QString object.

This can be addressed with the following change, which I just

@@ -56,9 +56,9 @@ from PyQt4.QtGui import (QWidget, QLineEdit, QComboBox, QLabel
                          QPixmap, QTabWidget, QApplication, QStackedWidget,
                          QDateEdit, QDateTimeEdit, QFont, QFontComboBox,
                          QFontDatabase, QGridLayout)
-from PyQt4.QtCore import (Qt, SIGNAL, SLOT, QSize, QString,
+from PyQt4.QtCore import (Qt, SIGNAL, SLOT, QObject, QSize,
                           pyqtSignature, pyqtProperty)
import datetime


 class ColorButton(QPushButton):
@@ -102,7 +102,8 @@ def text_to_qcolor(text):
     Avoid warning from Qt when an invalid QColor is instantiated
     """
     color = QColor()
-    if isinstance(text, QString):
+    if isinstance(text, QObject):
+        # actually a QString, which is not provided by the new PyQt4 API:
         text = str(text)
     if not isinstance(text, (unicode, str)):
         return color

------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev 
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to