mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-22 00:06:12 -05:00
Show tooltips for column headings in Execute SQL dialog
This commit is contained in:
parent
6e793522b5
commit
c82aace7b6
@ -143,9 +143,17 @@ QVariant QgsQueryResultModel::data( const QModelIndex &index, int role ) const
|
||||
|
||||
QVariant QgsQueryResultModel::headerData( int section, Qt::Orientation orientation, int role ) const
|
||||
{
|
||||
if ( orientation == Qt::Orientation::Horizontal && role == Qt::ItemDataRole::DisplayRole && section < mColumns.count() )
|
||||
if ( orientation == Qt::Orientation::Horizontal && section < mColumns.count() )
|
||||
{
|
||||
return mColumns.at( section );
|
||||
switch ( role )
|
||||
{
|
||||
case Qt::ItemDataRole::DisplayRole:
|
||||
case Qt::ItemDataRole::ToolTipRole:
|
||||
return mColumns.at( section );
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
return QAbstractTableModel::headerData( section, orientation, role );
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user