Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QTreeView items not selectable in Release mode (VS2015)

QTreeView items not selectable in Release mode (VS2015)

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 3 Posters 1.4k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    benvanbasten
    wrote on last edited by
    #1

    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..

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi
      and you see this behavior in small test project ?

      B 1 Reply Last reply
      0
      • mrjjM mrjj

        Hi
        and you see this behavior in small test project ?

        B Offline
        B Offline
        benvanbasten
        wrote on last edited by
        #3

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

        m.sueM 1 Reply Last reply
        0
        • B benvanbasten

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

          m.sueM Offline
          m.sueM Offline
          m.sue
          wrote on last edited by
          #4

          Hi @benvanbasten

          Which WINDOWS version?

          -Michael

          B 1 Reply Last reply
          1
          • m.sueM m.sue

            Hi @benvanbasten

            Which WINDOWS version?

            -Michael

            B Offline
            B Offline
            benvanbasten
            wrote on last edited by
            #5

            @m.sue said in QTreeView items not selectable in Release mode (VS2015):

            WS ver

            Windows 7

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved