QComboBox 可编辑时,信号activated()触发两次?
部分代码 ...... QComboBox *combo = new QComboBox(this); combo->setEditable(true); combo->setInsertPolicy(QComboBox::NoInsert); ...... connect(combo, SIGNAL(activated(int)), this, SLOT(testSlot(int)));// void testSlot(int index)为测试使用的自定义槽 ...... 操作: 当combo获得光标焦点,并下拉展开内部选项后,回车(注意:一定是回车,而非鼠标点击)选中某选项时, 问题: 信号activated() 为何被触发两次?? 是我用得不对,还是QT的bug? 有解决办法吗?