[PySide] manually closing editor on custom delegate

Frank Rueter | OHUfx frank at ohufx.com
Thu May 3 23:11:31 CEST 2018


Hi Christian,

thanks for taking a look.
The behaviour in the gif is the expected one, but it won't happen if you 
click in the white are of the same cell.

The context menu actually behaves exactly like I want, so I am looking 
into customising that which should simplify the code as well.

Cheers,
frank

On 4/05/18 12:43 AM, Cristián Maureira-Fredes wrote:
> Hello Frank,
>
> I'm a little bit confused,
> is the attached GIF the expected behavior?
> of you would like to display the selected number inside the green area
> where the QComboBox is located?
>
> Cheers
>
> ________________________________________
> From: PySide <pyside-bounces+cristian.maureira-fredes=qt.io at qt-project.org> on behalf of Frank Rueter | OHUfx <frank at ohufx.com>
> Sent: 02 May 2018 08:32:15
> To: pyside at qt-project.org
> Subject: [PySide] manually closing editor on custom delegate
>
> Hi all,
>
> I think I need some MVC help once again:
>
> I am using a custom item delegate that uses the bottom 20 pixels of a cell in a table view for a QComboBox (the rest will be static content).
> I can create the editor in the right spot etc, but I can't figure out how to close it again when the user clicks into the upper part of the cell.
> I tried all sorts of events and signals in the view, the delegate and the editor itself but to no avail.
> This is the state of things:
>
> The initial table:
> [cid:part1.536450FE.04B9AE79 at ohufx.com]
>
> The table with the open editor after clicking into the bottom 20 pixels of a cell:
> [cid:part2.BA3B0C5A.24875983 at ohufx.com]
>
> The table after I click away from the editor but into the same cell, in which case I'd like to close it and show the initial state as seen above, but I just can't figure out how to.
> [cid:part3.BD4E6D0F.FB85F365 at ohufx.com]
>
> Attached is the working code to produce the above images.
>
> Any help would be greatly appreciated!
>
> Cheers,
> frank
>
>
> --
>
> [ohufxLogo 50x50]<http://www.ohufx.com>
>          vfx compositing<http://ohufx.com/compositing.html> | workflow customisation and consulting<http://ohufx.com/customising.html>
>                  <http://ohufx.com/compositing.html>
>
> [http://nukepedia.com/images/nuBridge/logo/nuBridge_logo.png] <http://www.nukepedia.com/nubridge>
>
>
> Your gateway to over 1,000 free tools... right inside of Nuke<http://www.nukepedia.com/nubridge>
>
>




More information about the PySide mailing list