开发者

QComboBox with single value: Select this value

I have a QComboBox which changes its selection possibilities depending on certain conditions. Because of special combinations, it might have only one selection left over, which has to be "confirmed" by the user, preferably by looking at all possible selections, seeing that there is only one, and then selecting this.

My problem: If a user selects the only optio开发者_C百科n there is, the value is never set, i.e. no signal is sent. Is there a way to circumvent this?


Use SIGNAL(highlighted(...)) instead of SIGNAL(activated(...)). Or do a setCurrentIndex(-1) before, this should work with activated().

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜