mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-30 00:11:51 +02:00
Qt: bugfix - TQtAbstractItemView needs overriden setColor().
git-svn-id: trunk@16308 -
This commit is contained in:
parent
eedc289813
commit
dfb110a9fb
@ -820,6 +820,7 @@ type
|
||||
|
||||
procedure modelIndex(retval: QModelIndexH; row, column: Integer; parent: QModelIndexH = nil);
|
||||
function visualRect(Index: QModelIndexH): TRect;
|
||||
procedure SetColor(const Value: PQColor); override;
|
||||
procedure setEditTriggers(ATriggers: QAbstractItemViewEditTriggers);
|
||||
procedure setSelectionMode(AMode: QAbstractItemViewSelectionMode);
|
||||
procedure setSelectionBehavior(ABehavior: QAbstractItemViewSelectionBehavior);
|
||||
@ -8469,6 +8470,19 @@ begin
|
||||
QAbstractItemView_visualRect(QAbstractItemViewH(Widget), @Result, Index);
|
||||
end;
|
||||
|
||||
procedure TQtAbstractItemView.SetColor(const Value: PQColor);
|
||||
var
|
||||
Palette: QPaletteH;
|
||||
begin
|
||||
Palette := QPalette_create(QWidget_palette(Widget));
|
||||
try
|
||||
QPalette_setColor(Palette, QPaletteBase, Value);
|
||||
QWidget_setPalette(Widget, Palette);
|
||||
finally
|
||||
QPalette_destroy(Palette);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TQtAbstractItemView.setEditTriggers(
|
||||
ATriggers: QAbstractItemViewEditTriggers);
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user