QGIS API Documentation 3.99.0-Master (26c88405ac0)
Loading...
Searching...
No Matches
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:

Public Member Functions

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

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 28 of file qgstablewidgetitem.h.

Constructor & Destructor Documentation

◆ QgsTableWidgetItem() [1/2]

QgsTableWidgetItem::QgsTableWidgetItem ( )
default

◆ QgsTableWidgetItem() [2/2]

QgsTableWidgetItem::QgsTableWidgetItem ( const QString & text)

Creates a new table widget item with the specified text.

Definition at line 20 of file qgstablewidgetitem.cpp.

Member Function Documentation

◆ operator<()

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

Definition at line 35 of file qgstablewidgetitem.cpp.

◆ setSortRole()

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 25 of file qgstablewidgetitem.cpp.

◆ sortRole()

int QgsTableWidgetItem::sortRole ( ) const

Gets the role by which the items should be sorted.

By default this will be Qt::DisplayRole

Definition at line 30 of file qgstablewidgetitem.cpp.


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