MCPcopy Create free account
hub / github.com/KangLin/RabbitRemoteControl / keyPressEvent

Method keyPressEvent

Plugins/WebBrowser/AutoCompleteLineEdit.cpp:47–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45}
46
47void CAutoCompleteLineEdit::keyPressEvent(QKeyEvent *event)
48{
49 switch (event->key()) {
50 case Qt::Key_Tab:
51 case Qt::Key_Right:
52 // 按下Tab或右箭头接受建议
53 acceptSuggestion();
54 event->accept();
55 return;
56 case Qt::Key_Escape:
57 // ESC取消建议
58 hideSuggestion();
59 event->accept();
60 return;
61 default:
62 QLineEdit::keyPressEvent(event);
63 }
64}
65
66void CAutoCompleteLineEdit::focusInEvent(QFocusEvent *event)
67{

Callers

nothing calls this directly

Calls 1

acceptMethod · 0.45

Tested by

no test coverage detected