[PyQt] Possible display bug with editable QTreeWidgetItem on Linux
Vincent Michel
vxgmichel at gmail.com
Wed Sep 10 09:03:25 BST 2014
I tried with several different styles:
(cleanlooks, windows, motif, platinium, cde, plastique...)
and they all seem to work perfectly.
But the native style on my system is GTK, and this:
python pyqt_test.py -style gtk
produces the same problem I described.
So yes, it definitely seems like this issue comes from the GTK style.
Vincent
On Tue, 2014-09-09 at 21:07 +0200, David Boddie wrote:
> On Tue, 09 Sep 2014 10:02:26 +0200, Vincent Michel wrote:
>
> > I noticed a strange display bug when I ran a code using an editable
> > QTreeItemWidget on a Linux machine (this doesn't happen on Windows).
> >
> > While editing the widget, the previous value is still visible and messes
> > up with the new value that is being typed.
>
> Does the problem only occur with the native style? Which style is the
> native one on your system? Can you try it with another one by passing
> the -style option on the command line, like this example?
>
> python your_program.py -style cleanlooks
>
> You need to change your code to ensure that the command line arguments
> are processed by Qt:
>
> import sys
> from PyQt4 import QtCore, QtGui
> app = QtGui.QApplication(sys.argv)
> widget = QtGui.QTreeWidget()
> item = QtGui.QTreeWidgetItem(widget, ['x'*8])
> item.setFlags(QtCore.Qt.ItemIsEditable | QtCore.Qt.ItemIsEnabled)
> widget.show()
> app.exec_()
>
> David
> _______________________________________________
> PyQt mailing list PyQt at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
More information about the PyQt
mailing list