mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-13 12:49:21 +02:00
Qt: don't focus TQtGroupBox in any case if TabStop=False.
git-svn-id: trunk@22055 -
This commit is contained in:
parent
5e79f9ef5b
commit
12c824bf15
@ -101,7 +101,7 @@ type
|
|||||||
function GetStyleSheet: WideString;
|
function GetStyleSheet: WideString;
|
||||||
function GetWidget: QWidgetH;
|
function GetWidget: QWidgetH;
|
||||||
function LCLKeyToQtKey(AKey: Word): Integer;
|
function LCLKeyToQtKey(AKey: Word): Integer;
|
||||||
function QtButtonsToLCLButtons(AButtons: QTMouseButton): PtrInt;
|
function QtButtonsToLCLButtons(AButtons: QtMouseButton): PtrInt;
|
||||||
function QtKeyModifiersToKeyState(AModifiers: QtKeyboardModifiers): PtrInt;
|
function QtKeyModifiersToKeyState(AModifiers: QtKeyboardModifiers): PtrInt;
|
||||||
function QtKeyToLCLKey(AKey: Integer; AText: WideString): Word;
|
function QtKeyToLCLKey(AKey: Integer; AText: WideString): Word;
|
||||||
procedure SetProps(const AnIndex: String; const AValue: pointer);
|
procedure SetProps(const AnIndex: String; const AValue: pointer);
|
||||||
@ -531,6 +531,7 @@ type
|
|||||||
function EventFilter(Sender: QObjectH; Event: QEventH): Boolean; cdecl; override;
|
function EventFilter(Sender: QObjectH; Event: QEventH): Boolean; cdecl; override;
|
||||||
function getText: WideString; override;
|
function getText: WideString; override;
|
||||||
procedure setText(const W: WideString); override;
|
procedure setText(const W: WideString); override;
|
||||||
|
procedure setFocusPolicy(const APolicy: QtFocusPolicy); override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TQtToolBar }
|
{ TQtToolBar }
|
||||||
@ -2466,7 +2467,7 @@ begin
|
|||||||
DeliverMessage(Msg);
|
DeliverMessage(Msg);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TQtWidget.QtButtonsToLCLButtons(AButtons: QTMouseButton): PtrInt;
|
function TQtWidget.QtButtonsToLCLButtons(AButtons: QtMouseButton): PtrInt;
|
||||||
begin
|
begin
|
||||||
Result := 0;
|
Result := 0;
|
||||||
if (QtLeftButton and AButtons) <> 0 then
|
if (QtLeftButton and AButtons) <> 0 then
|
||||||
@ -4741,6 +4742,16 @@ begin
|
|||||||
setLayoutThemeMargins(QWidget_Layout(Widget), Widget);
|
setLayoutThemeMargins(QWidget_Layout(Widget), Widget);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TQtGroupBox.setFocusPolicy(const APolicy: QtFocusPolicy);
|
||||||
|
var
|
||||||
|
NewPolicy: QtFocusPolicy;
|
||||||
|
begin
|
||||||
|
NewPolicy := APolicy;
|
||||||
|
if Assigned(LCLObject) and not LCLObject.TabStop then
|
||||||
|
NewPolicy := QtNoFocus;
|
||||||
|
inherited setFocusPolicy(NewPolicy);
|
||||||
|
end;
|
||||||
|
|
||||||
{ TQtFrame }
|
{ TQtFrame }
|
||||||
|
|
||||||
function TQtFrame.CreateWidget(const AParams: TCreateParams): QWidgetH;
|
function TQtFrame.CreateWidget(const AParams: TCreateParams): QWidgetH;
|
||||||
|
Loading…
Reference in New Issue
Block a user