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

Method attachToLineEdit

Plugins/WebBrowser/AddressCompleter.cpp:133–151  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

131}
132
133void CAddressCompleter::attachToLineEdit(QLineEdit *lineEdit)
134{
135 if (m_pLineEdit) {
136 m_pLineEdit->removeEventFilter(this);
137 m_pLineEdit->setToolTip(m_szOldLineEditToolTip);
138 }
139
140 m_pLineEdit = lineEdit;
141 if (m_pLineEdit) {
142 m_szOldLineEditToolTip = m_pLineEdit->toolTip();
143 m_pLineEdit->setToolTip(m_szLineEditToolTip);
144 m_pLineEdit->installEventFilter(this);
145 connect(m_pLineEdit, &QLineEdit::textEdited,
146 this, &CAddressCompleter::onTextChanged);
147
148 // 设置提示文本
149 m_pLineEdit->setPlaceholderText(m_szEnter);
150 }
151}
152
153void CAddressCompleter::setMaxVisibleItems(int count)
154{

Callers 1

Q_LOGGING_CATEGORYFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected