Forum
Sign Up

QTreeWidget single-selection issue

6 years 9 months ago #1 by 无锡飞谱电子信息技术有限公司
in code QTitanRibbon-4.14.0 with Qt 5.8 by VS 2013 in win10 64bit platform.
When in single-selection mode, two tree item can be displayed as selection in QTreeWidget.

The method to re-produce this issue:
1: open the example project in the installation directory qtitanribbon.pro
2: use the OfficeStyleWIdgets project
3: change the following code as below:
void TreeBoxDock::createWidgets()
{
QTreeWidget* treeWidget = new QTreeWidget;
// Comments out
//treeWidget->setAlternatingRowColors(true);
// Switch it to single selection mode
treeWidget->setSelectionMode(QAbstractItemView::SingleSelection);
treeWidget->setSelectionBehavior(QAbstractItemView::SelectItems);

and then build and run it, and try to select the different tree items many times, you will see two items are displayed as selection in UI. In the attached picture, the item2 and Item4 get displayed as selection.
Attachments:

Please Log in or Create an account to join the conversation.

More
6 years 9 months ago #2 by Developer Machines
Thank you for the bug-report. It will be fixed in 4.16 version.
The following user(s) said Thank You: 无锡飞谱电子信息技术有限公司

Please Log in or Create an account to join the conversation.

More
6 years 8 months ago #3 by 无锡飞谱电子信息技术有限公司
I have verified that this bug has been fixed in 4.16 in my application. Thanks very much.
The following user(s) said Thank You: Developer Machines

Please Log in or Create an account to join the conversation.

More
  • Not Allowed: to create new topic.
  • Not Allowed: to reply.
  • Not Allowed: to edit your message.
Moderators: Developer Machines
Time to create page: 0.136 seconds

Developer Newsletter

Join our Developer Machines newsletter to get informed on all the latest releases of the commercial components for Qt.C++, Delphi FireMonkey, updates and general knowledges.

Quick Support

Should you need any additional information about our products or licensing, please contact us at the following email addresses:

  • This email address is being protected from spambots. You need JavaScript enabled to view it.

  • This email address is being protected from spambots. You need JavaScript enabled to view it.

Get in Touch

If you would like to purchase our products or services, but don’t know how to do it the right way, please feel free to contact us:

  • This email address is being protected from spambots. You need JavaScript enabled to view it.( any questions related to our products or services )
  • This email address is being protected from spambots. You need JavaScript enabled to view it.( questions related to licensing )