[Qt-interest] createEditor() larger than parent cell

Israel Brewster israel at frontierflying.com
Mon Apr 13 18:25:33 CEST 2009


On Apr 11, 2009, at 10:43 AM, Surya Kiran Gullapalli wrote:

> On 4/11/09, Israel Brewster <israel at frontierflying.com> wrote:
>> I asked this a while ago, but didn't get any response, so I figured
>> I'd ask again. I have a QTableView and custom QItemDelegate in the
>> createEditor() function of which I am making a QSpinBox. I would like
>> to make the QSpinBox somewhat larger than the parent cell, i.e. let
>> the up and down arrows of the spin box overlap the next cell while
>> editing (or go off the edge of the table slightly if the last  
>> cell). I
>> tried just setting the size in the create editor function, but this
>> doesn't appear to stick. How can I manage this? Or is it simply
>> impossible? Thanks.
>
> Try overriding updateEditorGeometry (virtual function in  
> QAbstractItemDelegate).

Worked like a charm! Thanks!

-----------------------------------------------
Israel Brewster
Computer Support Technician II
Frontier Flying Service Inc.
5245 Airport Industrial Rd
Fairbanks, AK 99709
(907) 450-7250 x293
-----------------------------------------------

>
> Surya




More information about the Qt-interest-old mailing list