making it work
This commit is contained in:
+10
-1
@@ -18,7 +18,9 @@ NetworksModel::NetworksModel(QObject *parent)
|
||||
:
|
||||
QAbstractListModel(parent)
|
||||
{
|
||||
|
||||
QList<Network> networks;
|
||||
networks.append(Network("Gita test"));
|
||||
this->m_networks = networks;
|
||||
}
|
||||
|
||||
int NetworksModel::rowCount(const QModelIndex &parent) const
|
||||
@@ -53,6 +55,13 @@ void NetworksModel::scan()
|
||||
this->m_networks = networks;
|
||||
}
|
||||
|
||||
QHash<int, QByteArray> NetworksModel::roleNames() const
|
||||
{
|
||||
QHash<int, QByteArray> roles;
|
||||
roles[NetworksModel::NetworkRoles::NameRole] = "name";
|
||||
return roles;
|
||||
}
|
||||
|
||||
Network::Network(const QString &name)
|
||||
: m_name(name)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user