44 #ifndef QT_NO_ITEMVIEWS 53 #include <private/qtextengine_p.h> 350 return fontMetrics.
elidedText(text, mode, width);
381 switch (event->
type()) {
382 #ifndef QT_NO_TOOLTIP 392 #ifndef QT_NO_WHATSTHIS 414 #endif // QT_NO_ITEMVIEWS The QVariant class acts like a union for the most common Qt data types.
The QFontMetrics class provides font metrics information.
#define QT_END_NAMESPACE
This macro expands to.
virtual void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const
Updates the geometry of the editor for the item with the given index, according to the rectangle spec...
QVariant data(int role=Qt::DisplayRole) const
Returns the data for the given role for the item referred to by the index.
QAbstractItemDelegate(QObject *parent=0)
Creates a new abstract item delegate with the given parent.
bool helpEvent(QHelpEvent *event, QAbstractItemView *view, const QStyleOptionViewItem &option, const QModelIndex &index)
Whenever a help event occurs, this function is called with the event view option and the index that c...
QString toString() const
Returns the variant as a QString if the variant has type() String , Bool , ByteArray ...
The QString class provides a Unicode character string.
The QObject class is the base class of all Qt objects.
virtual bool event(QEvent *)
This virtual function receives events to an object and should return true if the event e was recogniz...
virtual void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const
Sets the data for the item at the given index in the model to the contents of the given editor...
virtual ~QAbstractItemDelegate()
Destroys the abstract item delegate.
QString elidedText(const QString &text, Qt::TextElideMode mode, int width, int flags=0) const
If the string text is wider than width, returns an elided version of the string (i.
virtual bool editorEvent(QEvent *event, QAbstractItemModel *model, const QStyleOptionViewItem &option, const QModelIndex &index)
When editing of an item starts, this function is called with the event that triggered the editing...
virtual QWidget * createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const
Returns the editor to be used for editing the data item with the given index.
#define QT_BEGIN_NAMESPACE
This macro expands to.
bool canConvert(Type t) const
Returns true if the variant's type can be cast to the requested type, t.
The QAbstractItemModel class provides the abstract interface for item model classes.
The QAbstractItemView class provides the basic functionality for item view classes.
QObject * parent() const
Returns a pointer to the parent object.
The QModelIndex class is used to locate data in a data model.
const QPoint & globalPos() const
Returns the mouse cursor position when the event was generated in global coordinates.
The QStyleOptionViewItem class is used to describe the parameters used to draw an item in a view widg...
virtual void setEditorData(QWidget *editor, const QModelIndex &index) const
Sets the contents of the given editor to the data for the item at the given index.
static void showText(const QPoint &pos, const QString &text, QWidget *w=0)
Shows text as a "What's This?" window, at global position pos.
bool isValid() const
Returns true if the storage type of this variant is not QVariant::Invalid; otherwise returns false...
static QString elidedText(const QFontMetrics &fontMetrics, int width, Qt::TextElideMode mode, const QString &text)
Use QFontMetrics::elidedText() instead.
The QEvent class is the base class of all event classes.
Type type() const
Returns the event type.
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
The QHelpEvent class provides an event that is used to request helpful information about a particular...