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

QCompleter constructor bug

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 1.1.1, dev
    • Fix Version/s: 5.9
    • Component/s: PySide
    • Labels:
    • Commits:
      84db89c50e217db8811f20a58f959e82824d8338

      Description

      from PySide import QtGui, QtCore
      
      m = QtGui.QStandardItemModel()
      o = QtCore.QObject()
      
      # from pyside docs: class PySide.QtGui.QCompleter(model[, parent=None])
      
      # Model is not set correctly:
      c = QtGui.QCompleter( m, o ) 
      print c.model(), c.parent() # None <PySide.QtGui.QStandardItemModel object at 0x191d8c0>
      
      # If parent is kwarg, it throws an exception:
      c = QtGui.QCompleter( m, parent = o ) # PySide.QtGui.QCompleter(): got multiple values for keyword argument 'parent'.
      
      # this is currently the only way to do it:
      c = QtGui.QCompleter() 
      c.setModel(m)
      c.setParent(o)
      print c.model(), c.parent()
      

        Attachments

        For Gerrit Dashboard: PYSIDE-203
        # Subject Branch Project Status CR V

          Activity

            People

            Assignee:
            crmaurei Cristian Maureira-Fredes
            Reporter:
            wpb william bryant
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes