Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

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

    General and Desktop
    2
    3
    503
    Loading More Posts
    • 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
      Tannin last edited by

      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 Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        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 Reply Quote 0
        • T
          Tannin last edited by

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

          1 Reply Last reply Reply Quote 0
          • First post
            Last post