///
void paint(QPainter * painter, QStyleOptionViewItem const & option,
- const QModelIndex &index) const {
+ QModelIndex const & index) const {
QComboBox * combo = static_cast<QComboBox const *>(parent());
// Draw using the menu item style (this is how QComboBox does it).
public:
///
GuiFilterProxyModel(QObject * parent)
- : QSortFilterProxyModel(parent) {}
+ : QSortFilterProxyModel(parent) {}
///
void setCharFilter(QString const & f)
// FIXME: There must be a better way. The QComboBox::AdjustToContents)
// does not help.
if (view()->isVisible())
- showPopup();
+ QComboBox::showPopup();
}
}
+void GuiLayoutBox::showPopup()
+{
+ resetFilter();
+ owner_.message(_("Enter characters to filter the layout list."));
+ QComboBox::showPopup();
+}
+
+
bool GuiLayoutBox::eventFilter(QObject * o, QEvent * e)
{
if (e->type() != QEvent::KeyPress)
QString is = model_->item(i, 0)->text();
while (is.compare(titem) < 0) {
// e.g. --Separator--
- if (is[0].category() != QChar::Letter_Uppercase)
+ if (is.at(0).category() != QChar::Letter_Uppercase)
break;
++i;
if (i == end)