mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-08 23:18:01 +02:00
Qt,Qt5,Qt6: fixed wierd focus behaviour. issue #10155
This commit is contained in:
parent
d2e0bdee01
commit
559078741e
@ -5002,7 +5002,7 @@ end;
|
||||
procedure TQtWidget.setFocus;
|
||||
begin
|
||||
if getFocusPolicy <> QtNoFocus then
|
||||
QWidget_setFocus(Widget, QtTabFocusReason)
|
||||
QWidget_setFocus(Widget, QtOtherFocusReason) {issue #10155}
|
||||
else
|
||||
QWidget_setFocus(Widget);
|
||||
end;
|
||||
@ -12615,7 +12615,7 @@ begin
|
||||
begin
|
||||
// issue #40089
|
||||
if {(ViewStyle < 0) and} (QEvent_type(Event) = QEventFocusIn) and
|
||||
(QFocusEvent_reason(QFocusEventH(Event)) = QtTabFocusReason) and
|
||||
(QFocusEvent_reason(QFocusEventH(Event)) >= QtTabFocusReason) and
|
||||
(TCustomListBox(LCLObject).ItemIndex = -1) then
|
||||
begin
|
||||
Result := True;
|
||||
|
@ -5093,7 +5093,7 @@ end;
|
||||
procedure TQtWidget.setFocus;
|
||||
begin
|
||||
if getFocusPolicy <> QtNoFocus then
|
||||
QWidget_setFocus(Widget, QtTabFocusReason)
|
||||
QWidget_setFocus(Widget, QtOtherFocusReason) {issue #10155}
|
||||
else
|
||||
QWidget_setFocus(Widget);
|
||||
end;
|
||||
@ -12900,7 +12900,7 @@ begin
|
||||
begin
|
||||
// issue #40089
|
||||
if {(ViewStyle < 0) and} (QEvent_type(Event) = QEventFocusIn) and
|
||||
(QFocusEvent_reason(QFocusEventH(Event)) = QtTabFocusReason) and
|
||||
(QFocusEvent_reason(QFocusEventH(Event)) >= QtTabFocusReason) and
|
||||
(TCustomListBox(LCLObject).ItemIndex = -1) then
|
||||
begin
|
||||
Result := True;
|
||||
|
@ -5100,7 +5100,7 @@ end;
|
||||
procedure TQtWidget.setFocus;
|
||||
begin
|
||||
if getFocusPolicy <> QtNoFocus then
|
||||
QWidget_setFocus(Widget, QtTabFocusReason)
|
||||
QWidget_setFocus(Widget, QtOtherFocusReason) {issue #10155}
|
||||
else
|
||||
QWidget_setFocus(Widget);
|
||||
end;
|
||||
@ -12932,7 +12932,7 @@ begin
|
||||
begin
|
||||
// issue #40089
|
||||
if {(ViewStyle < 0) and} (QEvent_type(Event) = QEventFocusIn) and
|
||||
(QFocusEvent_reason(QFocusEventH(Event)) = QtTabFocusReason) and
|
||||
(QFocusEvent_reason(QFocusEventH(Event)) >= QtTabFocusReason) and
|
||||
(TCustomListBox(LCLObject).ItemIndex = -1) then
|
||||
begin
|
||||
Result := True;
|
||||
|
Loading…
Reference in New Issue
Block a user