How to change placeholder text in ctkCheckableComboBox

Hi, I’m currently building an extension and I’m using a few ctkCheckableComboBox widgets, which I’m creating in a .ui file and then loading on my Python script for the extension I’m building. I’m wondering if there’s any way to change the text of the widget when no option is selected. By default it say ‘None’ but I wanted to change it. Tried with the attribute placeholderText but didn’t work. I’d appreciate any help. Thanks in advance!

The text associated with the None selection of a ctkCheckableComboBox appears to be hardcoded at the following location so it is not something modifiable from a UI file. What were you hoping to change the text to be?

Yeah, I saw that part of the C++ code, I guess I was just hoping that perhaps there was a workaround haha. So I’m currently building an extension that will help with some file conversion, so I have a list of files from which the user could select which to import/convert:

So I created some ComboBoxes with the options All/None so that it’s easier to select/deselect all files at once (the widgets that say ‘All’ are the ctkCheckableComboBox widgets, which have two QCheckBox items: ‘All’ and ‘None’). So as you can see, I have two ‘None’ options. When I select the ‘None’ from my option, the ctkCheckableComboBox shows ‘None’ but when I have no option selected (when not all files are selected but some are) it also shows ‘None’.
Then I was expecting to change the placeholder to something like ‘—’ or so.

It seems like you desire the checkable functionality as used in the File Name column of the Add Data and Save Data (see image below) dialogs within Slicer.


Since you are using a QTableWidget, you may want to look into using a ctkCheckableHeaderView which is that type of functionality where it is checked to display that All items are checked, unchecked when all items are unchecked, and the tristate display when some items are checked and some are unchecked.