[Interest] Persistent Editor keep focus when opening new window
Joshua Grauman
jnfo-c at grauman.com
Sun Feb 24 01:43:29 CET 2013
Bill,
Thanks so much, that looked like it should do the trick. But
onfortunately, when my new window pops up (even with those flags, I tried
both Qt::Dialog and Qt::Popup), the delegate still looses focus and thus
is deleted... Thanks so much though. If it matters, I'm using Qt5.0.1 on
Linux.
Josh
> On 02/23/2013 04:40 PM, Joshua Grauman wrote:
>> Hello all,
>>
>> I have a QTableWidget that uses a custom delegate. When I double click on
>> a cell, the editor comes up fine. But then I want to be able to pull up a
>> helper widget/window to enter data into the persistent editor. The problem
>> is, when I show the new widget/window, the QTableWidget looses focus and
>> the persistent editor is destroyed. Does anyone have any idea of how to
>> bring up a new widget/window while still editing the persistent editor
>> delegate? Thanks.
>>
>
> Josh:
>
> I had the same problem, but don't remember which, of the hundreds
> of lines of code I have had to write to trick Qt into giving me the
> behavior I want, was added to fix this problem.
>
> I think it was this (on the custom editor window) :
>
> Qt::WindowFlags flags = windowFlags();
> flags |= Qt::Dialog;
> // flags |= Qt::Popup;
> setWindowFlags(flags);
> setWindowModality(Qt::ApplicationModal);
>
> Bill
>
>> Josh
>> _______________________________________________
>> Interest mailing list
>> Interest at qt-project.org
>> http://lists.qt-project.org/mailman/listinfo/interest
>>
>
More information about the Interest
mailing list