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. Disabled item in QTreeWidget breaks navigation keys - bug or feature?
QtWS25 Last Chance

Disabled item in QTreeWidget breaks navigation keys - bug or feature?

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 653 Views
  • 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.
  • T Offline
    T Offline
    Tannin
    wrote on last edited by
    #1

    Easy to reproduce: Create a new window, add a QTreeWidget with a couple of items then in the application code append a disabled item to the widget:

    @QTreeWidgetItem *disabledItem = new QTreeWidgetItem(QStringList() << "last");
    disabledItem->setDisabled(true);
    ui->treeWidget->addTopLevelItem(disabledItem);@

    Now the page-down and end buttons won't work on the widget, probably because the last item can't be selected.
    The question is: Is this reasonable behaviour? Shouldn't the last enabled item be selected?

    Is there a workaround for this?

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

      Hi,

      Sounds indeed a bit strange. You should take a look at the "bug report system":http://bugreports.qt.io to see if someone already mentionned that behavior

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • T Offline
        T Offline
        Tannin
        wrote on last edited by
        #3

        Well, I didn't find a fitting report so I created one myself: https://bugreports.qt.io/browse/QTBUG-44746

        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