Ok, this is more complicated than I thought
I found two things that work:
- make the channels property a QList<QObject*>
- Use a QAbstractListModel derived class to provide the channel data
Some other observations:
- main.cpp cannot compile because there is no MainWindow.h, it is mainwindow.h
- this can be written much shorter. Instead of
QString::fromStdString("channel " + QString::number(i
).
toStdString()).
toStdString().
c_str())
QString::fromStdString("channel " + QString::number(i).toStdString()).toStdString().c_str())
To copy to clipboard, switch view to plain text mode
write this
QString("channel %1").arg(i);
To copy to clipboard, switch view to plain text mode
Cheers,
_
Bookmarks