QGIS API Documentation  3.4.15-Madeira (e83d02e274)
Public Member Functions | List of all members
QgsTableWidgetItem Class Reference

This can be used like a regular QTableWidgetItem with the difference that a specific role can be set to sort. More...

#include <qgstablewidgetitem.h>

Inheritance diagram for QgsTableWidgetItem:
Inheritance graph
[legend]

Public Member Functions

 QgsTableWidgetItem ()=default
 Constructor for QgsTableWidgetItem. More...
 
 QgsTableWidgetItem (const QString &text)
 Creates a new table widget item with the specified text. More...
 
bool operator< (const QTableWidgetItem &other) const override
 
void setSortRole (int role)
 Set the role by which the items should be sorted. More...
 
int sortRole () const
 Gets the role by which the items should be sorted. More...
 

Detailed Description

This can be used like a regular QTableWidgetItem with the difference that a specific role can be set to sort.

Definition at line 27 of file qgstablewidgetitem.h.

Constructor & Destructor Documentation

QgsTableWidgetItem::QgsTableWidgetItem ( )
default

Constructor for QgsTableWidgetItem.

QgsTableWidgetItem::QgsTableWidgetItem ( const QString &  text)

Creates a new table widget item with the specified text.

Definition at line 18 of file qgstablewidgetitem.cpp.

Member Function Documentation

bool QgsTableWidgetItem::operator< ( const QTableWidgetItem &  other) const
override

Definition at line 33 of file qgstablewidgetitem.cpp.

void QgsTableWidgetItem::setSortRole ( int  role)

Set the role by which the items should be sorted.

By default this will be set to Qt::DisplayRole

Definition at line 23 of file qgstablewidgetitem.cpp.

int QgsTableWidgetItem::sortRole ( ) const

Gets the role by which the items should be sorted.

By default this will be Qt::DisplayRole

Definition at line 28 of file qgstablewidgetitem.cpp.


The documentation for this class was generated from the following files: