diff --git a/lcl/interfaces/qt/qtobject.inc b/lcl/interfaces/qt/qtobject.inc index c1a8119608..c60b3b00f6 100644 --- a/lcl/interfaces/qt/qtobject.inc +++ b/lcl/interfaces/qt/qtobject.inc @@ -162,6 +162,18 @@ begin TQtMainWindow(Application.MainForm.Handle).BringToFront; end; +{procedure TQtWidgetSet.AppSetIcon(const AIcon: HICON); +var + Icon: TQtIcon; +begin + Icon := TQtIcon(AIcon); + if Icon <> nil then + QApplication_setWindowIcon(Icon.Handle) + else + QApplication_setWindowIcon(nil); +end; +} + procedure TQtWidgetSet.AppSetTitle(const ATitle: string); begin // TODO diff --git a/lcl/interfaces/qt/qtwscontrols.pp b/lcl/interfaces/qt/qtwscontrols.pp index bcadf1c081..cacc989541 100644 --- a/lcl/interfaces/qt/qtwscontrols.pp +++ b/lcl/interfaces/qt/qtwscontrols.pp @@ -88,11 +88,11 @@ type // class function GetText(const AWinControl: TWinControl; var AText: String): Boolean; override; // class procedure SetText(const AWinControl: TWinControl; const AText: string); override; -{ + class procedure SetChildZPosition(const AWinControl, AChild: TWinControl; const AOldPos, ANewPos: Integer; - const AChildren: TFPList); override;} + const AChildren: TFPList); override; class procedure ConstraintsChange(const AWinControl: TWinControl); override; end; @@ -334,6 +334,13 @@ begin end; end; +class procedure TQtWSWinControl.SetChildZPosition(const AWinControl, + AChild: TWinControl; const AOldPos, ANewPos: Integer; const AChildren: TFPList); +begin + {$note TODO: QWidget::stackUnder, QWidget::raise, QWidget::lower} + inherited SetChildZPosition(AWinControl, AChild, AOldPos, ANewPos, AChildren); +end; + class procedure TQtWSWinControl.ConstraintsChange(const AWinControl: TWinControl); const QtMaxContraint = $FFFFFF; diff --git a/lcl/interfaces/qt/qtwsforms.pp b/lcl/interfaces/qt/qtwsforms.pp index 3cd9cdc4fe..1a4312ad25 100644 --- a/lcl/interfaces/qt/qtwsforms.pp +++ b/lcl/interfaces/qt/qtwsforms.pp @@ -33,7 +33,7 @@ uses {$else} qt4, {$endif} - qtwidgets, + qtobjects, qtwidgets, // LCL SysUtils, Classes, Controls, LCLType, Forms, // Widgetset @@ -257,8 +257,14 @@ end; Returns: Nothing ------------------------------------------------------------------------------} class procedure TQtWSCustomForm.SetIcon(const AForm: TCustomForm; const AIcon: HICON); +var + Icon: TQtIcon; begin - inherited SetIcon(AForm, AIcon); + Icon := TQtIcon(AIcon); + if Icon <> nil then + TQtWidget(AForm.Handle).setWindowIcon(Icon.Handle) + else + TQtWidget(AForm.Handle).setWindowIcon(nil); end; {------------------------------------------------------------------------------