Browse Source

Example showing both ListViews backed by static models

pull/183/head
Duke Leto 4 years ago
parent
commit
b16aa21fc7
  1. 7
      src/mainwindow.cpp

7
src/mainwindow.cpp

@ -1045,7 +1045,14 @@ void MainWindow::setupChatTab() {
contacts << "Alice" << "Bob" << "Charlie" << "Eve";
chatModel->setStringList(contacts);
QStringListModel *conversationModel = new QStringListModel();
QStringList conversations;
conversations << "Bring home some milk" << "Markets look rough" << "How's the weather?" << "Is this on?";
conversationModel->setStringList(conversations);
//TODO: ui->contactsView->setModel( model of address book );
ui->contactsView->setModel(chatModel);
ui->chatView->setModel( conversationModel );
}
void MainWindow::setupMarketTab() {

Loading…
Cancel
Save