Results 1 to 10 of 10

Thread: Qwt: Is it possible to perform GUI operations from a separate QProcess?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #4
    Join Date
    Dec 2020
    Posts
    4
    Thanks
    5
    Qt products
    Qt5
    Platforms
    Unix/X11

    Default Re: Qwt: Is it possible to perform GUI operations from a separate QProcess?

    Quote Originally Posted by d_stranz View Post
    In any case, you should not perform your screen updates based on some QTimer or similar mechanism that establishes an update rate. Instead, you should use Qt's signal and slot mechanism to let the image creation thread tell the main thread that a new image is ready and to update the on-screen display. Otherwise, you run the risk of either wasting a lot of time in inappropriate polling or seeing glitches due to incompletely rendered images.
    Currently, my first plot paints onto a widget still, but I plan on modifying my code to paint onto a QImage in a separate thread later on. Before I do that though, I am just curious, how could I use the signal and slot mechanism to notify when I am finished painting? Would I need to re-implement paintEvent and emit a signal after calling painter.end() ?

    Thank you, I greatly appreciate your help.


    Added after 4 minutes:


    Quote Originally Posted by Uwe View Post
    Better use Qwt 6.2 from SVN ( being released soon ) as it has a significant optimization ( QwtPlotCurve::FilterPointsAggressive ), that might be relevant for your usecase.

    Uwe
    Awesome! Thanks for the reply. I will check it out soon.
    How does this compare with QwtPlotCurve::FilterPoints? When I set QwtPlotCurve::FilterPoints to true, my frame rate drops from 16.5 FPS to 14.5 FPS.
    Last edited by seanj; 22nd December 2020 at 19:24.

Similar Threads

  1. How to perform HSV Color mixing ?
    By Ashketchup in forum Qt Programming
    Replies: 1
    Last Post: 12th April 2012, 20:28
  2. Replies: 10
    Last Post: 30th January 2012, 11:01
  3. how to perform search in QTableWidget?
    By aurora in forum Qt Programming
    Replies: 3
    Last Post: 5th January 2012, 04:25
  4. Replies: 15
    Last Post: 24th December 2011, 12:07
  5. Problem with QProcess in two separate threads
    By viheaho in forum Qt Programming
    Replies: 2
    Last Post: 18th March 2010, 22:52

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.