waynew
30th January 2010, 01:36
I need to get the position of a QTableView.
The view has already been instantiated in a MainWindow function.
I have no problem referencing it in other MainWindow functions.
Here is what I have tried:
QPoint logPos = MainWindow::view->pos();
int xLog = MainWindow::view->logPos.x();
int yLog = MainWindow::view->logPos.y();
The error I get is: 'class QTableView' has no member named 'logPos'
I understand the error, but I don't know how to correct the code.
When I do similar code for MainWindow position, it works fine.
Any suggestions considered :)
The view has already been instantiated in a MainWindow function.
I have no problem referencing it in other MainWindow functions.
Here is what I have tried:
QPoint logPos = MainWindow::view->pos();
int xLog = MainWindow::view->logPos.x();
int yLog = MainWindow::view->logPos.y();
The error I get is: 'class QTableView' has no member named 'logPos'
I understand the error, but I don't know how to correct the code.
When I do similar code for MainWindow position, it works fine.
Any suggestions considered :)