1

我想知道是否可以在 QAxObject 中执行一些命令/操作链接。

例如,要更改 Excel 中的单元格颜色,我需要执行以下操作:

QAxObject* cell = sheet->querySubObject("Cells(int,int)",row,col));
QAxObject* interior = cell->querySubObject("Interior"));
interior->setProperty("Color",color);

所以我想知道是否有可能是这样的:

QAxObject* cell = sheet->querySubObject("Cells(int,int)",row,col));
cell->setProperty("Interior.Color"),color);

或更好:

cell.Interior.Color = color;
4

0 回答 0