forked from qt-creator/qt-creator
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user