C++ (Qt)void QPalette::setColor ( ColorGroup group, ColorRole role, const QColor & color )
C++ (Qt)QPalette pallete = palette();pallete.setColor(QPalette::Inactive, QPalette::Background, pallete.color(QPalette::Active, QPalette::Background));pallete.setColor(QPalette::Inactive, QPalette::Foreground, pallete.color(QPalette::Active, QPalette::Foreground));frozen_tree_view_->setPalette(pallete);
C++ (Qt)QString styleSheet = QString("QTreeView {" "selection-color:%1;" "selection-background-color:%2;}") .arg(palette().color(QPalette::Active, QPalette::HighlightedText).name()) .arg(palette().color(QPalette::Active, QPalette::Highlight).name());frozen_tree_view_->setStyleSheet(styleSheet);