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

QCompleter constructor bug

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.9
    • 1.1.1
    • PySide
    • 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

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: