[PyKDE] QStringList &QStringList::operator+=(const QString &)
 missing from PyQt?
    Nigel Stewart 
    ns at fluent.com
       
    Sat Mar 25 00:53:23 GMT 2006
    
    
  
Hello all,
I noticed that operator+=(const QString &) doesn't work from
Python, even though it is documented as part of the Qt 3.3 API:
http://doc.trolltech.com/3.3/qvaluelist.html#operator+-eq
Works:
         l = QStringList()
         l.append("Hello")
         l.append("World")
Doesn't work:
         l = QStringList()
         l += QString("Hello")
         l += QString("World")
Perhaps it needs to be added to qstringlist.sip
PyQt-x11-gpl-snapshot-20060323/sip/qt $ grep operator qstringlist.sip
         QString operator[](int);
         QStringList operator[](SIP_PYSLICE);
         QStringList operator+(const QStringList &);
         QStringList &operator+=(const QStringList &);
         QStringList operator*(int);
         QStringList &operator*=(int);
         bool operator==(const QStringList &);
         bool operator!=(const QStringList &);
Since I switch a lot between C++ and Python perhaps I'm more likely
than most to discover this kind of issue. :-)
We're using Sip 4.3.2 and PyQt 3.15.1
Regards,
Nigel Stewart
    
    
More information about the PyQt
mailing list