QTreeView items not selectable in Release mode (VS2015)



  • I recently updated my project to Qt version 4.8.7 and Visual Studio 2015.

    I noticed that my QTreeWidget has difficulties in Release mode. The items are highlighting when the mouse hovers over, but actually selecting them requires many clicks. This is only the case in release mode, in debug mode, everything works fine.

    See this very simple example

    // add some test items
    for (size_t t = 0; t < 4; t++)
    {
        QTreeWidgetItem* item = new QTreeWidgetItem(ui->dataTreeWidget);
        item->setText(0, "level1");
        for (size_t c = 0; c < 4; c++)
        {
            QTreeWidgetItem* item2 = new QTreeWidgetItem(item);
            item2->setText(0, "level2");
    
            for (size_t r = 0; r < 4; r++)
            {
                QTreeWidgetItem* item3 = new QTreeWidgetItem(item2);
                item3->setText(0, "level3");
            }
        }
    }
    

    In release mode, after many (double) clicks on this item, it is still only highlighted, not selected
    alt text

    In debug mode, the item is selected after a single click (as expected)

    alt text

    Is this a bug in Qt 4.8.7 (possibly an interaction with VS2015)? Is there a workaround?

    Any help would be really appreciated..


  • Lifetime Qt Champion

    Hi
    and you see this behavior in small test project ?



  • @mrjj yes, Qt 4.8.7 and VS2015, only in release mode



  • Hi @benvanbasten

    Which WINDOWS version?

    -Michael




Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.