Important: Please read the Qt Code of Conduct -

Mouse Click location/field on a website

  • 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?



  • @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) :
        ui(new Ui::MainWindow)
        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()));
        delete ui;
    void MainWindow::webclick()
        QUrl site("");

Log in to reply