0
votes

I've to deal with a scientific application and thus have to use RTF at many place (think about displaying units with exponents mainly).

I've implemented a delegate to deal with tables and drop box and it works mostly fine. (implementation : http://pastebin.com/FuCbGqkY , header : http://pastebin.com/D6hxeWdF ).

However, I've been into a major issue : it looks like the "button" part of the QComboBox is not rendered with the delegate (it only applies to the drop down box). Is there any way to have the text in the combobox when it's not dropped displayed correctly ? If not, what do I have to do ? Subclass and overwrite paint method ? Looks like a lot of pain and basically it makes the delegate useless.enter image description here

Any clue ?

1

1 Answers

0
votes

Consider QComboBox::lineEdit() method. You can try to apply your changes to the QLineEdit directly if it's possible. Otherwise you can subclass QLineEdit and change its behaviour to what you want, and then insert it using QComboBox::setLineEdit. Maybe you will need to make the combo box editable in order to use this.