QTreeWidget * pTreeWidget = new QTreeWidget();
pTreeWidget->setAlternatingRowColors(true);
pTreeWidget->setPalette(QPalette(Qt::gray));
note: setPalette(const QPalette &);单独使用无效。
需配合setAlternatingRowColors(bool enable)使用交替变色
QTreeWidget * pTreeWidget = new QTreeWidget();
pTreeWidget->setAlternatingRowColors(true);
pTreeWidget->setPalette(QPalette(Qt::gray));
note: setPalette(const QPalette &);单独使用无效。
需配合setAlternatingRowColors(bool enable)使用交替变色