QHBoxLayout *otherLayout = new QHBoxLayout();
recentKeywordsLayout = new QVBoxLayout();
- recentKeywordsLayout->setAlignment(Qt::AlignTop);
+ recentKeywordsLayout->setAlignment(Qt::AlignTop | Qt::AlignLeft);
recentKeywordsLabel = new QLabel(tr("Recent keywords").toUpper(), this);
recentKeywordsLabel->hide();
recentKeywordsLabel->setForegroundRole(QPalette::Dark);
setLayout(mainLayout);
- // watchButton->setMinimumHeight(queryEdit->height());
-
updateChecker = 0;
checkForUpdate();
}
+ "\" style=\"color:palette(text); text-decoration:none\">"
+ keyword + "</a>", this);
- // Make links navigable with the keyboard
- // this makes links nonclickable so it's disabled
- // itemLabel->setTextInteractionFlags(Qt::LinksAccessibleByKeyboard);
+ itemLabel->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
+ // Make links navigable with the keyboard too
+ itemLabel->setTextInteractionFlags(Qt::LinksAccessibleByKeyboard | Qt::LinksAccessibleByMouse);
+
connect(itemLabel, SIGNAL(linkActivated(QString)), this, SLOT(watch(QString)));
recentKeywordsLayout->addWidget(itemLabel);
}
return;
}
- // save keyword
- QSettings settings;
- QStringList keywords = settings.value(recentKeywordsKey).toStringList();
- keywords.removeAll(query);
- keywords.prepend(query);
- while (keywords.size() > 10)
- keywords.removeLast();
- settings.setValue(recentKeywordsKey, keywords);
+ queryEdit->preventSuggest();
// go!
emit search(query);