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:
And part of the cpp:
Code:
model->setTable("log"); model->select(); view->setModel(model); view->setMinimumSize(1200,100); view->move(35,80); view->setSortingEnabled(TRUE); header->setMovable(TRUE); view->show();
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.
Code:
checkPrefs(); void MainWindow::checkPrefs() { view->setWindowTitle("My Log"); MainWindow::model->setFilter("call = 'k0zav'"); }
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?