Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
qtws26_logo

The Qt Event of the Year: Qt World Summit 2026

Save Your Spot >
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Creating Slots for numerous loadProgress signals of an array of QWebEnginePage objects.
Qt 6.12 LTS is out! See what's new in the release blog

Creating Slots for numerous loadProgress signals of an array of QWebEnginePage objects.

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 541 Views 1 Watching
  • 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.
  • D Offline
    D Offline
    desun_evan
    wrote on last edited by
    #1

    I have a QList<QWebEnginePage*>that is connected to QWebEnginePage::loadProgress with connect(qListContainer[i], &QWebEnginePage::loadProgress, this, &MainWindow::loadProgressSlot)
    This is accomplished with a for()loop for every QWebEnginePage*in my QList

    I want to create a slot for every connected QWebEnginePage. I cannot foresee how many slots I will need. Is there a way to create these slots iteratively? Is there a better solution for individually connecting the &QWebEnginePage::loadProgresssignal to multiple slots updating individual progress bars?

    Thanks.

    M 1 Reply Last reply
    0
    • D desun_evan

      I have a QList<QWebEnginePage*>that is connected to QWebEnginePage::loadProgress with connect(qListContainer[i], &QWebEnginePage::loadProgress, this, &MainWindow::loadProgressSlot)
      This is accomplished with a for()loop for every QWebEnginePage*in my QList

      I want to create a slot for every connected QWebEnginePage. I cannot foresee how many slots I will need. Is there a way to create these slots iteratively? Is there a better solution for individually connecting the &QWebEnginePage::loadProgresssignal to multiple slots updating individual progress bars?

      Thanks.

      M Offline
      M Offline
      mpergand
      wrote on last edited by mpergand
      #2

      @desun_evan
      In MainWindow::loadProgressSlot()
      you can test the sender of the signal and update your progress bars accordingly:

      if(sender()==qListContainer[0]) update progressbar0
      else...

      D 1 Reply Last reply
      1
      • M mpergand

        @desun_evan
        In MainWindow::loadProgressSlot()
        you can test the sender of the signal and update your progress bars accordingly:

        if(sender()==qListContainer[0]) update progressbar0
        else...

        D Offline
        D Offline
        desun_evan
        wrote on last edited by desun_evan
        #3

        @mpergand I will try this, thank you.

        Update:
        Works fine, I was unware of sender() of QObject. Thanks!

        1 Reply Last reply
        0
        • D desun_evan has marked this topic as solved on

        • Login

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