Exemplo n.º 1
0
DCLineEdit::DCLineEdit(QWidget * parent)
	: QLineEdit(parent)
{
	setReadOnly(true);
	editEnabled = false;
	connect(this, SIGNAL(returnPressed()), this, SLOT(on_returnPressed()));
}
Exemplo n.º 2
0
UrlNavigator::UrlNavigator(QAbstractItemModel *model, const QUrl &url,
                           QWidget *parent)
    : QLineEdit(parent)
    , m_model(model)
    , m_completer(new QCompleter(m_model, this))
    , m_historyIndex(0)
    , m_historyMax(30)
{
    setLocationUrl(url);
    setCompleter(m_completer);
    connect(this, SIGNAL(returnPressed()), this, SLOT(on_returnPressed()));
}