How to get QTableView position
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:
Code:
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 :)
Re: How to get QTableView position
Shouldn't the code be -
Code:
QPoint logPos
= MainWindow
::view->pos
();
int xLog = logPos.x();
int yLog = logPos.y();
:rolleyes:
No doubt you get the error that logPos is not a member of mainwindow :)
Re: How to get QTableView position
Of course. Thanks aamer4yu, it works fine now.