Open lichtwerk opened 11 years ago
just forwarding Simon Anderson's findings from the softimage mailinglist here: = = ==============================================================
just did a test and it seems that if you have a blank combo box it doesn't work, but when there are a few items in it, it seems to work correctly once the combo box has been selected. using the standard released build.
My thought is that if you don't delegate a string item it doesn't know what is meant to be in the QCombox, that is why keyboard input doesn't work.
from PyQt4 import QtGui, QtCore import sip si = Application sianchor = sip.wrapinstance(long(si.getQtSoftimageAnchor()), QtGui.QWidget)
dialog = QtGui.QMainWindow(sianchor) uiComboBox = QtGui.QComboBox(parent=dialog) uiComboBox.setFocusPolicy(QtCore.Qt.StrongFocus) uiComboBox.setEditable(True) uiComboBox.addItem("test") uiComboBox.addItem("zzz") dialog.show()
a few items? is there a specific number?
can we reproduce with standalone pyqt?
when you have an "editable" QComboBox and start typing, the events/letters seem to be passed on to Softimage. This results in keyboard shortcuts being performed in Softimage instead of text being written in the QComboBox...
==== code to reproduce (just run from the script editor) =========== from PyQt4 import QtGui, QtCore import sip si = Application sianchor = sip.wrapinstance(long(si.getQtSoftimageAnchor()), QtGui.QWidget)
dialog = QtGui.QMainWindow(sianchor) uiComboBox = QtGui.QComboBox(parent=dialog) uiComboBox.setFocusPolicy(QtCore.Qt.StrongFocus) uiComboBox.setEditable(True) dialog.show() ==== code to reproduce (just run from the script editor) ===========
Greetz Philipp
P.S.: still using PyQtForSoftimage_beta5.xsiaddon from 05/02/2013