[Qt-interest] open QFileEdit from itemdelegate editor

Ioan Calin Borcoman iborco at gmail.com
Sun Apr 18 13:28:42 CEST 2010


Hi,

Just after sending the e-mail I've discovered that setting the
Qt::StrongFocus for the button solves my problem. Sorry for the noise
:)

Cheers,

Ionutz

On Sun, Apr 18, 2010 at 10:41 AM, Ioan Calin Borcoman <iborco at gmail.com> wrote:
> Hi,
>
> I have a listview with an itemdelegate attached to it.
>
> I would like to be able to call QFileDialog::getOpenFileName when
> clicking a button from the custom editor created by the delegate (when
> editing an item of listview).
>
> The problem is that the listview will close the editor while the
> QFileDialog is shown and the app crashes. I guess this is because the
> focus moves from the custom editor to the QFileDialog and the listview
> thinks editing has been canceled.
>
> Is there a way to stop the listview from exiting the edit mode when
> displaying the QFileDialog?
>
> Thanx,
>
> Ionutz
>



More information about the Qt-interest-old mailing list