FAQ Database Discussion Community


QComboBox style for choosed item in drop-down list

qt,qcombobox,qss
I want to style the highlightation of choosed item in drop-down of combobox. The difference to other questions is that I do not want to style "selected" item(hovered with mouse) .. BUT I am interested in styling the already choosed item. The default is some sort of ticker which is...

PyQt Enable/Disable elements in a QComboBox

python,python-3.x,pyqt,pyqt4,qcombobox
I have a QComboBox that list all Windows' drive letters and let the user choose among them. During the execution, we need to enable or disable some of the letters (without removing them). Here is the basic code : all_letters = ["{}:".format(chr(i)) for i in range(90, 64, -1)] # Z:...

PyQt, QComboBox with QStringModel cause QObject::startTimer: QTimer can only be used with threads started with QThread

python,qt,pyqt,qcombobox
below is runnable example for PyQt4, I using below code and got very strange issue like this QObject::startTimer: QTimer can only be used with threads started with QThread after closed the window: combo = ExtendedComboBox() # combo.addItems(string_list) combo.setModel(QStringListModel(string_list)) Once I changed to below codes, everything is working well: combo =...

select QString which is added to QcomboBox by setEditText(QString) method

qt,qcombobox
how to select a text which I have add to my QComboBox by comboBox->setEditText(someString). I want my text to be appeared by "selecting all the text" in combobox.

QT Combo Box of Line Pattern

c++,qt,qcombobox
i want to make a line pattern combo box in Qt same as it is shown in the picture , please tell me is it possible to make a combo box in Qt like shown in the picture. Any help would be appreciated Regards ...

Set Value to QComboBox from QStringList

c++,qt4,qcombobox
In my Qt C++ GUI application I have a QDialog window, there I have a few line-edits and I am setting the display texts by function call and setText(). I have stored the values in a QStringList (the QStringList I am populating via Database Query) and setting text as follows--...

PyQt4 QComboBox autocomplete without using setModel?

autocomplete,pyqt4,qcombobox
I have found several excellent examples of a PyQt4 QComboBox with autocomplete (e.g. How do I Filter the PyQt QCombobox Items based on the text input?), but they all use setModel and setSourceModel... etc. Is it possible to create an autocomplete QComboBox in PyQt4 without using a model?...