selectOption(s)(ByValue)
selectOption(objectOrName, text)
This function selects the option with the given text
in the objectOrName
select form element (which may be a select or select-one element). If the element is a multi-selection box, multiple options to be selected can be passed in the text
separated by commas.
selectOptions(objectOrName, listOfTexts)
This function selects options from the objectOrName
select form element (which may be a select or select-one element). For each entry in the listOfTexts
a corresponding option with that visible text will be selected. If the element only allows single selection, the passed in listOfTexts
has to contain only a single entry.
selectOptionByValue(objectOrName, value)
This function selects the option with the given value
attribute in the objectOrName
select form element (which may be a select or select-one element).
selectOptionsByValue(objectOrName, listOfValues)
This function selects options from the objectOrName
select form element (which may be a select or select-one element). For each entry in the listOfValues
a corresponding option with that value attribute will be selected. If the element only allows single selection, the passed in listOfValues
has to contain only a single entry.
© 2024 The Qt Company Ltd.
Documentation contributions included herein are the copyrights of
their respective owners.
The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.
Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property
of their respective owners.