[Qt] QTabWidget problem

zeljko zeljko at holobit.net
Fri Jan 30 12:25:21 CET 2009


On Friday 30 January 2009 10:57, Den.Jean at telenet.be wrote:
> >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 ...
>
> Well this one liner is pretty.
> As Tabbar is private subwidget, the solution
> to return public TabWidget is acceptable.
>
>
> Index: lcl/interfaces/qt/qtwidgets.pas
> ===================================================================
> --- lcl/interfaces/qt/qtwidgets.pas	(revision 18503)
> +++ lcl/interfaces/qt/qtwidgets.pas	(working copy)
> @@ -5590,6 +5590,7 @@
>       objectName is qt_tabwidget_tabbar.}
>      FTabBar := QLCLTabWidget_tabBarHandle(QTabWidgetH(Widget));
>      QWidget_setFocusPolicy(FTabBar, QtNoFocus);
> +    setProperty(FTabBar, 'lclwidget', Int64(PtrUInt(Self)));
>    end;
>    Result := FTabBar;
>  end;

no, I've already introduced TQtTabBar (but firs on my mind was adding 
property) instead of adding property to FTabBar.
I'll extend TQtTabBar later so it can be created as separate widget, so we can 
get better control  from LCL over it.

tnx.

zeljko



More information about the Qt mailing list