Hy,<br><br>I'm displaying some combo box in a table widget and it work quiet well.<br>My problem is that I can't get that the column's size of the table is enough to see the max size of the combo.<br><br>Here is a little sample:<br>
<br>from PyQt4 import QtGui<br>import sys<br><br>app = QtGui.QApplication(sys.argv)<br><br>table = QtGui.QTableWidget()<br>table.setRowCount(2)<br>table.setColumnCount(2)<br>table_header = table.horizontalHeader()<br>table_header.setResizeMode(table_header.Interactive)<br>
<br>combo = QtGui.QComboBox()<br>combo.addItem("blop")<br>combo.addItem("a very long word or sentence I want to be readeable in my table")<br>combo.setSizeAdjustPolicy(combo.AdjustToContents)<br><br>table.setCellWidget(0, 0, combo)<br>
<br>table.show()<br><br>sys.exit(app.exec_())<br><br clear="all"><br>Do you know how should I do it ?<br><br>-- <br>Alex<br>