Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Mouse Click location/field on a website
QtWS25 Last Chance

Mouse Click location/field on a website

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 398 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • James SprinksJ Offline
    James SprinksJ Offline
    James Sprinks
    wrote on last edited by
    #1

    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

    VRoninV 1 Reply Last reply
    0
    • James SprinksJ James Sprinks

      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

      VRoninV Offline
      VRoninV Offline
      VRonin
      wrote on last edited by
      #2

      @James-Sprinks said in Mouse Click location/field on a website:

      opened a website URL inside my program

      How? what widget are you using?

      "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
      ~Napoleon Bonaparte

      On a crusade to banish setIndexWidget() from the holy land of Qt

      1 Reply Last reply
      1
      • James SprinksJ Offline
        James SprinksJ Offline
        James Sprinks
        wrote on last edited by
        #3

        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);
        }
        
        
        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved