Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions codeless banner

QTextEntryProxy Class Reference

The QTextEntryProxy class provides a text entry widget for overlaying list widgets. More...

    #include <QTextEntryProxy>

This class is under development and is subject to change.

Inherits QWidget.

This class was introduced in Qtopia 4.3.

Public Functions


Additional Inherited Members

Detailed Description

The QTextEntryProxy class provides a text entry widget for overlaying list widgets.

QTextEntryProxy is a helper widget for overlaying on listboxes (or other widgets) which need a text based display of the currently entered text, whilst still allowing the proxied widget to retain focus.

    QTextEntryProxy *textEntry = new QTextEntryProxy(this, listbox);

    int mFindHeight = textEntry->sizeHint().height();
    QLabel *findIcon = new QLabel;
    findIcon->setPixmap(QIcon(":icon/find").pixmap(mFindHeight-2, mFindHeight-2));

    QHBoxLayout *findLayout = new QHBoxLayout;

    connect(textEntry, SIGNAL(textChanged(QString)), this, SLOT(textEntrytextChanged(QString)));

To Note: QTextEntryProxy has no way of determining what the SoftMenuBar context labels are/were, so it will replace the back key location with QSoftMenuBar::Back when no text is displayed by the object. As this handles 90% of use cases, no further work is scheduled on this until necessary.

See also setTarget().

Member Function Documentation

QTextEntryProxy::QTextEntryProxy ( QWidget * parent, QWidget * target )

Constructs a new text entry proxy object setting parent and target widgets.

QTextEntryProxy::~QTextEntryProxy ()

Destroys this object

void QTextEntryProxy::clear ()

Deletes all the text in the text entry.

void QTextEntryProxy::setTarget ( QWidget * target )

Sets the target of this object. This involves creating an event filter on the target object, so that it can filter events that it is interested in. If this object was previously targeted at another widget, it removes the eventfilters placed upon the original object.

QString QTextEntryProxy::text () const

Returns the current text displayed in the widget

void QTextEntryProxy::textChanged ( const QString & text )   [signal]

This signal is emitted whenever the text for this control is updated via user input to the target control.

Copyright © 2009 Nokia Trademarks
Qt Extended 4.4.3