Qt: bugfix - TQtAbstractItemView needs overriden setColor().

git-svn-id: trunk@16308 -
This commit is contained in:
zeljko 2008-08-30 15:12:15 +00:00
parent eedc289813
commit dfb110a9fb

View File

@ -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