From ae8406d82f541f6d9112bdac192e5e4e114d56aa Mon Sep 17 00:00:00 2001 From: David Faure Date: Wed, 6 May 2015 17:57:36 +0200 Subject: Deprecate ItemIsTristate in favor of ItemIsAutoTristate. This makes the behavior much more clear. You can get a tristate checkbox just by setting the CheckStateRole to PartiallyChecked, no tristate flag needed. The flag, on the other hand, enables the automatic-tristate behavior in QTreeViews (and only there), hence the new name for it. Change-Id: I18d292a8b8294c863eab806f3874d15dfb72556c Reviewed-by: Jarek Kobus --- examples/widgets/painting/fontsampler/mainwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples') diff --git a/examples/widgets/painting/fontsampler/mainwindow.cpp b/examples/widgets/painting/fontsampler/mainwindow.cpp index bff8ae9c22..53a2aac82e 100644 --- a/examples/widgets/painting/fontsampler/mainwindow.cpp +++ b/examples/widgets/painting/fontsampler/mainwindow.cpp @@ -80,7 +80,7 @@ void MainWindow::setupFontTree() QTreeWidgetItem *familyItem = new QTreeWidgetItem(fontTree); familyItem->setText(0, family); familyItem->setCheckState(0, Qt::Unchecked); - familyItem->setFlags(familyItem->flags() | Qt::ItemIsTristate); + familyItem->setFlags(familyItem->flags() | Qt::ItemIsAutoTristate); foreach (QString style, styles) { QTreeWidgetItem *styleItem = new QTreeWidgetItem(familyItem); -- cgit v1.2.3