[Interest] Persistent Editor keep focus when opening new window
jnfo-c at grauman.com
Sun Feb 24 18:27:20 CET 2013
Great idea. Thanks so much for the help.
> On 02/23/2013 07:43 PM, Joshua Grauman wrote:
>> 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
> Me, 4.7.1 on Linux.
> ...and I verified the solution I posted was what I
> had to do to solve the problem in my case.
> I reversed the Qt::Dialog/Qt::Popup flags and the
> problem re-emerged; The original editor window closed
> when I opened the secondary window.
> Perhaps you could override ::event on the primary window
> and block the event which is telling it to close?
>>> 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.
>>> 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;
>>>> Interest mailing list
>>>> Interest at qt-project.org
>> Interest mailing list
>> Interest at qt-project.org
> Interest mailing list
> Interest at qt-project.org
More information about the Interest