Mouse Click location/field on a website
Unsolved
General and Desktop
-
Hi all
I have opened a website URL inside my program, and was wondering if there was a way of capturing where on the site the mouse has been clicked, in order to ID and then fill in that field.
Any ideas?
Thanks
James
-
Hi all
I have opened a website URL inside my program, and was wondering if there was a way of capturing where on the site the mouse has been clicked, in order to ID and then fill in that field.
Any ideas?
Thanks
James
@James-Sprinks said in Mouse Click location/field on a website:
opened a website URL inside my program
How? what widget are you using?
-
I am using a QWidget that has been changed to a QWebEngineView class (called 'screen' in the code below):
ainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); timer = new QTimer(this); view = new QWebEngineView(this); connect(ui->web, SIGNAL(clicked(bool)),this,SLOT(webclick())); connect(ui->scrape, SIGNAL(clicked(bool)), this, SLOT(scrape())); connect(timer,SIGNAL(timeout()), this, SLOT(scrape())); } MainWindow::~MainWindow() { delete ui; } void MainWindow::webclick() { QUrl site("http://www.google.co.uk"); ui->screen->load(site); }