Thanks to the folks who have already helped me along with this, but I am still having a little trouble referencing class members.

Here's the relevant part of the header:
Qt Code:
  1. class QTableView;
  2.  
  3. private:
  4. QTableView *view;
To copy to clipboard, switch view to plain text mode 

And part of the cpp:

Qt Code:
  1. model = new QSqlTableModel();
  2. view = new QTableView();
  3.  
  4. model->setTable("log");
  5. model->select();
  6.  
  7. QTableView *view = new QTableView;
  8. view->setModel(model);
  9. view->setMinimumSize(1200,100);
  10. view->move(35,80);
  11. view->setSortingEnabled(TRUE);
  12. QHeaderView *header = view->horizontalHeader();
  13. header->setMovable(TRUE);
  14. view->show();
To copy to clipboard, switch view to plain text mode 

All of that works fine. Problem comes when I try to use model-> or view->
in a local function. No errors, but no results. Like trying to set the view title or apply a filter to the model. Both of these work fine if the code for them is right after the code shown above, but when in a local function like this, they have no effect.

Qt Code:
  1. checkPrefs();
  2.  
  3. void MainWindow::checkPrefs() {
  4. view->setWindowTitle("My Log");
  5. MainWindow::model->setFilter("call = 'k0zav'");
  6. }
To copy to clipboard, switch view to plain text mode 

And if I check the model assigned to the view in the checkPrefs code, it comes back empty.

So, what am I doing wrong here?