diff --git a/lcl/interfaces/qt/qtint.pp b/lcl/interfaces/qt/qtint.pp index 0d1f75a36b..af8c540b5b 100644 --- a/lcl/interfaces/qt/qtint.pp +++ b/lcl/interfaces/qt/qtint.pp @@ -70,9 +70,9 @@ type function InitHintFont(HintFont: TObject): Boolean; override; // create and destroy - function CreateComponent(Sender : TObject): LCLType.THandle; override; // deprecated - function CreateTimer(Interval: integer; TimerFunc: TFNTimerProc): LCLType.THandle; override; - function DestroyTimer(TimerHandle: LCLType.THandle): boolean; override; + function CreateComponent(Sender : TObject): THandle; override; // deprecated + function CreateTimer(Interval: integer; TimerFunc: TFNTimerProc): THandle; override; + function DestroyTimer(TimerHandle: THandle): boolean; override; // device contexts function IsValidDC(const DC: HDC): Boolean; virtual; diff --git a/lcl/interfaces/qt/qtobject.inc b/lcl/interfaces/qt/qtobject.inc index 861066d5bd..e75a38f388 100644 --- a/lcl/interfaces/qt/qtobject.inc +++ b/lcl/interfaces/qt/qtobject.inc @@ -50,8 +50,7 @@ end; Creates a new timer and sets the callback event. ------------------------------------------------------------------------------} -function TQtWidgetSet.CreateTimer(Interval: integer; - TimerFunc: TFNTimerProc): LCLType.THandle; +function TQtWidgetSet.CreateTimer(Interval: integer; TimerFunc: TFNTimerProc): THandle; var QtTimer: TQtTimer; begin @@ -67,7 +66,7 @@ end; Destroys a timer. ------------------------------------------------------------------------------} -function TQtWidgetSet.DestroyTimer(TimerHandle: LCLType.THandle): boolean; +function TQtWidgetSet.DestroyTimer(TimerHandle: THandle): boolean; begin TQtTimer(TimerHandle).Free; @@ -162,7 +161,7 @@ end; Deprecated, never call this function ------------------------------------------------------------------------------} -function TQtWidgetSet.CreateComponent(Sender : TObject): LCLType.THandle; +function TQtWidgetSet.CreateComponent(Sender : TObject): THandle; begin Result := 0; end; diff --git a/lcl/interfaces/qt/qtwidgets.pas b/lcl/interfaces/qt/qtwidgets.pas index 0ed7c6392f..ad29ca3de0 100644 --- a/lcl/interfaces/qt/qtwidgets.pas +++ b/lcl/interfaces/qt/qtwidgets.pas @@ -2080,11 +2080,8 @@ begin // Sets the initial items for I := 0 to TCustomListBox(AWinControl).Items.Count - 1 do begin - if (AWinControl as TStatusBar).SimplePanel then - begin; - Text := UTF8Decode((AWinControl as TStatusBar).SimpleText); - showMessage(@Text); - end; + Text := UTF8Decode(TCustomListBox(AWinControl).Items.Strings[i]); + QListWidget_addItem(QListWidgetH(Widget), @Text); end; // Sets itī s initial properties @@ -2313,8 +2310,11 @@ begin Parent := TQtWidget(AWinControl.Parent.Handle).Widget; Widget := QStatusBar_create(Parent); - Text := UTF8Decode(AWinControl.Caption); - showMessage(@Text); + if (AWinControl as TStatusBar).SimplePanel then + begin; + Text := UTF8Decode((AWinControl as TStatusBar).SimpleText); + showMessage(@Text); + end; // Sets itī s initial properties QWidget_setGeometry(Widget, AWinControl.Left, AWinControl.Top, diff --git a/lcl/interfaces/qt/qtwscomctrls.pp b/lcl/interfaces/qt/qtwscomctrls.pp index 70709ddc48..c08f399f26 100644 --- a/lcl/interfaces/qt/qtwscomctrls.pp +++ b/lcl/interfaces/qt/qtwscomctrls.pp @@ -249,7 +249,7 @@ begin Hook := QObject_hook_create(QtStatusBar.Widget); - TEventFilterMethod(Method) := QtStatusBar.EventFilter; + TEventFilterMethod(Method) := @QtStatusBar.EventFilter; QObject_hook_hook_events(Hook, Method);