The qcombobox plug-in integrates buttons and drop-down menus.
Qcombobox provides a drop-down menu option when it occupies the minimum screen space.
Qcombobox displays a series of optional items while displaying the current options. You can also edit ComboBox.
ComboBox can contain pixmap and strings (insertitem and setitemtext ). For editable ComboBox, clearedittext can be used to clear the strings used for display without changing the content of ComboBox.
When the current value of ComboBox changes, two signals (currentindexchanged and activated) can be sent ). Whether or not user interaction is pre-configured or exists in the program, currentindexchanged will always be activated, and activated will only be activated when user interaction exists. The highlighted signal is triggered when the user lights up the ComboBox drop-down menu. Both the qstring and INT versions are available. If you select or click a pixmap, only the int signal is triggered. When an editable ComboBox changes, the edittextchanged signal is triggered.
When you enter a new string into an editable ComboBox, The ComboBox plug-in can insert it or not, and the plug-in can also insert it into many locations. The default rule is atbottom, but you can also use setinsertpolicy to change the rule.
You can use qvalidator to restrict the input (setvalidator) of the Editable ComboBox ). By default, all inbound and outbound traffic is acceptable.
You can use insertitem to add a project to ComboBox. The project can be changed using setiemtext. A project can be removed with removeitem, and all projects can be removed with clear. The content of the current project can be returned using currenttext, and the content of the digital project can be returned using text. You can use setcurrentindex to set the current project. You can use count to return the number of ComboBox projects. You can use setmaxcount to set the maximum number of projects. You can use seteditable to edit a project. For editable ComboBox, you can use setcompleter to set Automatic completion. You can use setduplicatesenabled to set whether you can add a copy.
Qcombobox uses the model/view architecture to display the drop-down list and storage items. By default, the qstandarditemmodel Storage Project and qlistview subclass display a drop-down list. Users can access model and view, but qcombobox also provides functions to set and obtain data (setitemdata and itemtext ). You can also set a new model and view. The ComboBox label uses the data of the model with QT: displayrole and QT: decorationrole.