Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-2287

QtWidgets.QTreeWidgetItemIterator文档demo错误

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Not Evaluated
    • 6.5.0
    • 5.15.9
    • Documentation
    • None

    Description

      QTreeWidgetItemIterator — Qt for Python

      错误代码块:

       

      it = QTreeWidgetItemIterator(treeWidget)
      while it:
          if it.text(0) == itemText:
              *it.setSelected(True)
          ++it 

      错误代码就像从c++文档移植过来并且没有修改完整

       

      我认为应该是:

       

       

      it = QTreeWidgetItemIterator(treeWidget)
      while it.value():
          if it.value().text(0) == itemText:
              it.value().setSelected(True)
          it += 1

       

       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            kleint Friedemann Kleint
            cclfly 何 云扬
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes