Git: Remotedialog, replace QTableView with QTreeView

QTreeView is a better list view with columns than QTableView.
One special reason for this change is that QTreeView
finds a proper default row height regardless of the system
DPI.

Change-Id: I3342e2295a3782b480ea811bfe335e3a77482891
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Alessandro Portale
2014-06-03 15:44:12 +02:00
parent bb4031dccf
commit 8173961e05
4 changed files with 29 additions and 20 deletions

View File

@@ -139,6 +139,14 @@ QVariant RemoteModel::data(const QModelIndex &index, int role) const
return QVariant();
}
QVariant RemoteModel::headerData(int section, Qt::Orientation orientation, int role) const
{
if (role != Qt::DisplayRole || orientation != Qt::Horizontal)
return QVariant();
return (section == 0) ? tr("Name") : tr("Url");
}
bool RemoteModel::setData(const QModelIndex &index, const QVariant &value, int role)
{
if (role != Qt::EditRole)