Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个名为的类ValidableComboBox,它直接派生自QComboBox.
ValidableComboBox
QComboBox
的每个实例ValidableComboBox都setEditable()设置为true。我的目标是添加一些信号,每当有人在QComboBox.
setEditable()
true
为此,我void KeyPressEvent(QKeyEvent* e)在ValidableComboBox. 但是,当我在组合框中输入内容时,它似乎永远不会被调用。
void KeyPressEvent(QKeyEvent* e)
有没有办法做到这一点?我所做的可能有什么问题?
谢谢你。
你似乎在你的kode中使用的功能有一个Kapital K,而不是一个小k,好吗?:-D