[Qt] QTabWidget problem
zeljko
zeljko at holobit.net
Fri Jan 30 09:28:22 CET 2009
On Thursday 29 January 2009 22:00, Den Jean wrote:
> On Thursday 29 January 2009 21:15:43 zeljko wrote:
> > We'll .... it's possible that LCL calls are incorrect , I've lost some
> > time against this problem and couldn't find the way to fix it.
>
> try this for a starter, should move this temp ugly fix to a more
> appropriate place in lcl/qt, probably you know better, problem is that
> LCL/qt/NoteBook does not return it is focused.
yes, that's ugly patch, I'll fix it in another way ... inside qt.
TQtWinApi.getFocus() is quilty for that, I mean FTabBar is pure QWidget and
QApplication_focusWidget() returns that one, but FTabBar isn't TQtWidget ...
so that's problem :)
I didn't test for focus since visually TabBar have focus :)
tnx for analysis.
z
>
>
>
>
> Index: lcl/include/application.inc
> ===================================================================
> --- lcl/include/application.inc (revision 18497)
> +++ lcl/include/application.inc (working copy)
> @@ -1840,10 +1840,12 @@
> procedure TApplication.DoTabKey(AControl: TWinControl; var Key: Word;
> Shift: TShiftState);
> begin
> +writeln('====@@@*** DoTabKey called on ',AControl.ClassName,' with
> anoTabToSelectNext in Navigation:',anoTabToSelectNext in Navigation,'
> AControl.Focused:',AControl.Focused,' not
> WANTSPECIALKEY:',AControl.Perform(CM_WANTSPECIALKEY, Key, 0) = 0); if (Key
> = VK_TAB) and ((Shift - [ssShift]) = []) and
> - (anoTabToSelectNext in Navigation) and AControl.Focused and
> + (anoTabToSelectNext in Navigation) and (AControl.Focused or
> (AControl.ClassName='TNotebook')) and (AControl.Perform(CM_WANTSPECIALKEY,
> Key, 0) = 0) then
> begin
> + writeln(' DoTabKey calls AControl.PerformTab
> on:',AControl.ClassName); // traverse tabstop controls inside form
> AControl.PerformTab(not (ssShift in Shift));
> Key := VK_UNKNOWN;
>
> _______________________________________________
> Qt mailing list
> Qt at lazarus.freepascal.org
> http://www.lazarus.freepascal.org/mailman/listinfo/qt
More information about the Qt
mailing list