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. How to handle Qt Asynchronous calls when calling update() ?
Forum Updated to NodeBB v4.3 + New Features

How to handle Qt Asynchronous calls when calling update() ?

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 344 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.
  • J Offline
    J Offline
    jaggusri12
    wrote on last edited by
    #1

    Actually I need immediate calling of paintGL() for rendering image in window.
    While I am calling update(), It internally calls paintEvent() function asynchronously then this paintEvent() calls immediate paintGL().
    Update() does not cause an immediate repaint; instead it schedules a paint event for processing when Qt returns to the main event loop. Calling update() several times normally results in just one paintEvent() call.

    Christian EhrlicherC 1 Reply Last reply
    0
    • J jaggusri12

      Actually I need immediate calling of paintGL() for rendering image in window.
      While I am calling update(), It internally calls paintEvent() function asynchronously then this paintEvent() calls immediate paintGL().
      Update() does not cause an immediate repaint; instead it schedules a paint event for processing when Qt returns to the main event loop. Calling update() several times normally results in just one paintEvent() call.

      Christian EhrlicherC Online
      Christian EhrlicherC Online
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @jaggusri12 said in How to handle Qt Asynchronous calls when calling update() ?:

      Calling update() several times normally results in just one paintEvent() call.

      So what's the problem with this? That's a normal window manager behavior... if something is that fast that it gets merged noone will ever see it visually on the screen.

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      J 1 Reply Last reply
      1
      • Christian EhrlicherC Christian Ehrlicher

        @jaggusri12 said in How to handle Qt Asynchronous calls when calling update() ?:

        Calling update() several times normally results in just one paintEvent() call.

        So what's the problem with this? That's a normal window manager behavior... if something is that fast that it gets merged noone will ever see it visually on the screen.

        J Offline
        J Offline
        jaggusri12
        wrote on last edited by jaggusri12
        #3

        I have a yuv buf data that can be displayed into a qt window continuously. and I implemented a paintGL() that performs all rendering (Shader,Textures and Binding) operations. Here that yuv buf data was taken from different thread so I used Signal-Slot mechanism to communicate between two threads. (1)This signal-slot was added some delay to the next frame and this was added to main event loop(I think so).
        When I call update()/repaint(), (2)It call paintEvent() and that paintEvent() also added to main event loop . Buzz of these two delay operations I get some frame drops.
        So could please give me any suggestion to handle those two things in better way?

        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