I have found similar questions being asked, but without answers or where the answer is an alternative solution.
I need to create a breadcrumb trail in both QComboBoxes and QListWidgets (in PySide), and I'm thinking making these items' text bold. However, I have a hard time finding information on how to achieve this.
This is what I have:
# QComboBox
for server in servers:if optionValue == 'top secret':optionValue = serverelse:optionValue = '<b>' + server + '</b>'self.comboBox_servers.addItem( optionValue, 'data to store for this QCombobox item' )# QListWidgetItem
for folder in folders:item = QtGui.QListWidgetItem()if folder == 'top secret':item.setText( '<b>' + folder + '</b>' )else:item.setText( folder )iconSequenceFilepath = os.path.join( os.path.dirname(__file__), 'folder.png' )item.setIcon( QtGui.QIcon(r'' + iconSequenceFilepath + ''))item.setData( QtCore.Qt.UserRole, 'data to store for this QListWidgetItem' )self.listWidget_folders.addItem( item )