mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-20 02:50:46 -06:00
Show tooltips in DB Structure views
When hovering over an item in the tree views of the Database Structure tab or DB Schema pane, show a tooltip with the contents of that field. See issue #139.
This commit is contained in:
@@ -38,6 +38,8 @@ QVariant DbStructureModel::data(const QModelIndex& index, int role) const
|
||||
// Depending on the role either return the text or the icon
|
||||
if(role == Qt::DisplayRole)
|
||||
return PreferencesDialog::getSettingsValue("db", "hideschemalinebreaks").toBool() ? item->text(index.column()).replace("\n", " ") : item->text(index.column());
|
||||
else if(role == Qt::ToolTipRole)
|
||||
return item->text(index.column()); // Don't modify the text when it's supposed to be shown in a tooltip
|
||||
else if(role == Qt::DecorationRole)
|
||||
return item->icon(index.column());
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user