From 714ed8c65a907cd7d5dfba564cacddca11c99939 Mon Sep 17 00:00:00 2001 From: paul Date: Sun, 29 Jul 2007 10:50:11 +0000 Subject: [PATCH] (Qt): - skip setting border style in CreateHandle if Form in csDesigning state - switch qt event loop to LCL event loop (now idle is called) git-svn-id: trunk@11665 - --- lcl/interfaces/qt/qtobject.inc | 3 ++- lcl/interfaces/qt/qtwsforms.pp | 8 +++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/lcl/interfaces/qt/qtobject.inc b/lcl/interfaces/qt/qtobject.inc index feb734836e..7e90c66593 100644 --- a/lcl/interfaces/qt/qtobject.inc +++ b/lcl/interfaces/qt/qtobject.inc @@ -100,7 +100,8 @@ end; ------------------------------------------------------------------------------} procedure TQtWidgetSet.AppRun(const ALoop: TApplicationMainLoop); begin - QApplication_Exec; + if Assigned(ALoop) then ALoop; + //QApplication_Exec; end; {------------------------------------------------------------------------------ diff --git a/lcl/interfaces/qt/qtwsforms.pp b/lcl/interfaces/qt/qtwsforms.pp index a5defe513c..cd606afd08 100644 --- a/lcl/interfaces/qt/qtwsforms.pp +++ b/lcl/interfaces/qt/qtwsforms.pp @@ -170,9 +170,11 @@ begin QtMainWindow.SetWindowTitle(@Str); - SetQtWindowBorderStyle(QtMainWindow, TCustomForm(AWinControl).BorderStyle); - - SetQtBorderIcons(QtMainWindow, TCustomForm(AWinControl).BorderIcons); + if not (csDesigning in TCustomForm(AWinControl).ComponentState) then + begin + SetQtWindowBorderStyle(QtMainWindow, TCustomForm(AWinControl).BorderStyle); + SetQtBorderIcons(QtMainWindow, TCustomForm(AWinControl).BorderIcons); + end; // Sets Various Events QtMainWindow.AttachEvents;