add dynamic language change support
add "en" ts
This commit is contained in:
@@ -72,6 +72,20 @@ void EComboBox::showPopup() {
|
||||
}
|
||||
|
||||
|
||||
void EComboBox::changeEvent(QEvent * e) {
|
||||
QComboBox::changeEvent(e);
|
||||
switch (e->type()) {
|
||||
case QEvent::LanguageChange:
|
||||
#if QT_VERSION >= 0x040700
|
||||
filter.setPlaceholderText(tr("Filter"));
|
||||
#endif
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void EComboBox::filterChanged(const QString & text, bool first) {
|
||||
if (filter.text().isEmpty()) filter.setFont(ifont);
|
||||
else filter.setFont(nfont);
|
||||
|
||||
Reference in New Issue
Block a user