Results 1 to 14 of 14

Thread: real time data display

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: real time data display

    Just a side note - this code is not safe as it references a pixmap from a worker thread. It will probably fail sooner or later, especially on X11 systems.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  2. #2
    Join Date
    Jan 2013
    Posts
    21
    Thanks
    8
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: real time data display

    Hi, wysota
    I had met the same problems as hammer256. I am working on Windows XP. I have some questions.
    1. Why is it not safe to reference pixmap from worker thread? Would this cause big porblems on Windows.
    2. Please give me some advice if you have better solution.

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: real time data display

    Quote Originally Posted by honestapple View Post
    1. Why is it not safe to reference pixmap from worker thread?
    Because QPixmap could potentially access GUI data.

    Would this cause big porblems on Windows.
    It might crash your app.

    2. Please give me some advice if you have better solution.
    Use a shared QImage instance and generate a pixmap from it in the main thread.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  4. #4
    Join Date
    Jan 2013
    Posts
    21
    Thanks
    8
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: real time data display

    I knew that there was a pwt library which is used to plot. Which is better between the pwt library and the solution you advised?

  5. #5
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: real time data display

    I don't know what pwt is. I only know Qwt and it is hard to compare a home crafted solution with a library that has been on the market for years.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  6. The following user says thank you to wysota for this useful post:

    honestapple (25th March 2013)

Similar Threads

  1. Best way to display lots of data fast
    By New2QT in forum Newbie
    Replies: 4
    Last Post: 16th October 2008, 22:46
  2. Replies: 2
    Last Post: 29th September 2008, 00:08
  3. Display the camera frame in real time
    By alex_lue in forum Qt Programming
    Replies: 8
    Last Post: 27th July 2007, 10:31
  4. First attempt to display serial port data on GUI
    By ShaChris23 in forum Newbie
    Replies: 12
    Last Post: 4th May 2007, 09:14
  5. Displaying real time images
    By Sheetal in forum Qt Programming
    Replies: 9
    Last Post: 22nd February 2007, 11:29

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.