#include "gui\rusificationwidget.h" #include "ui_rusificationwidget.h" void doStuffWithEveryItemInMyTree( QTreeWidgetItem *item ) { item->setCheckState(0, Qt::Checked); for( int i = 0; i < item->childCount(); ++i ) doStuffWithEveryItemInMyTree( item->child(i) ); } RusificationWidget::RusificationWidget(LegacyApp *_app, QWidget *parent) : QWidget(parent), ui(new Ui::RusificationWidget), app(_app) { ui->setupUi(this); ui->treeWidget->expandAll(); doStuffWithEveryItemInMyTree(ui->treeWidget->invisibleRootItem()); } RusificationWidget::~RusificationWidget() { delete ui; }