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. QGraphicsScene interferes with QNetworkManager
Qt 6.11 is out! See what's new in the release blog

QGraphicsScene interferes with QNetworkManager

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 1.6k 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.
  • A Offline
    A Offline
    adnan
    wrote on last edited by
    #1

    I am using QNetworkManager to download files. If I connect the downloadProgress signal of QNetworkManager object to a slot of Main Gui Thread which draws on QGraphicsView, the download speed decreases more than 10 times:
    @
    // a custom progress bar
    void manager::showGProgress(int num, float prgrss) //slot
    {
    prgrss=prgrss/100;
    x_coord=(ui->graphicsView_2->width()-3)*prgrss;
    for(float b=0;b<=x_coord;b=b+0.5)
    {
    progress.addRect(0,0,x_coord,y_coord);
    //x_coord=(ui->graphicsView_2->width()-3)*prgrss;
    ui->graphicsView_2->setAlignment(Qt::AlignLeft);
    ui->graphicsView_2->setScene(&progress);
    //ui->graphicsView_2->show();
    }

    }@

    1 Reply Last reply
    0
    • K Offline
      K Offline
      koahnig
      wrote on last edited by
      #2

      I have introduced "code wrappings":http://qt-project.org/wiki/ForumHelp#e3f82045ad0f480d3fb9e0ac2d58fb01 Remember next time.

      Vote the answer(s) that helped you to solve your issue(s)

      1 Reply Last reply
      0
      • A Offline
        A Offline
        adnan
        wrote on last edited by
        #3

        Is there any alternative way of doing this, i.e. custom progress bar which won't interfere with QNetworkManager. QNetworkManager runs in a separate thread of its own, such things shouldn't occur.

        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