Skip to content

Commit

Permalink
Merge pull request LeGoffLoic#2 from glm-ypinczon/fix_QCompleterOnPys…
Browse files Browse the repository at this point in the history
…ide2

Fix QCompleter is in QtWidgets in PySide2(Qt5), was in QtGui in PySide(Qt4)
  • Loading branch information
glm-ypinczon authored Jul 12, 2017
2 parents 582360f + c484e76 commit b38b47a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion nodz_extra.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from glm.Qtpy import Qt
from glm.Qtpy.Qt import QtGui, QtCore, QtWidgets
import nodz_main

Expand Down Expand Up @@ -36,7 +37,10 @@ def popdown(self):

def setNodesList(self, nodeList):
self.nodeList = nodeList
self.completer = QtGui.QCompleter(self.nodeList, self)
if Qt.__binding__ == 'PySide2':
self.completer = QtWidgets.QCompleter(self.nodeList, self)
else: #PySide
self.completer = QtGui.QCompleter(self.nodeList, self)
self.completer.setCaseSensitivity(QtCore.Qt.CaseInsensitive)
self.setCompleter(self.completer)
self.completer.activated.connect(self.onCompleterActivatedSlot)
Expand Down

0 comments on commit b38b47a

Please sign in to comment.