[PyQt] Editor alignment in QTreeView

Albert Cervera i Areny albert at nan-tic.com
Sun Mar 13 10:37:43 GMT 2011

in our application we right-align dates and numbers in QTreeViews using the 
TextAlignmentRole. The problem is that Qt shows the editor (QLineEdit) for 
those items, over the column on the right of the current cell. I tried to 
ensure QLineEdit's alignment was 'RightAlign' so at least it would go over 
current cell but that didn't work. 

I attach a small image showing the problem. The edited text "23/02/2011" 
should be shown right after the rest of the dates.

Anyone have an idea how to solve that?

Thanks in advance!

Albert Cervera i Areny
OpenERP Partners
Tel: +34 93 553 18 03
skype: nan-oficina

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20110313/b5f9772d/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: incorrect-alignment.png
Type: image/png
Size: 14404 bytes
Desc: not available
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20110313/b5f9772d/attachment-0001.png>

More information about the PyQt mailing list