Why update 50 times per second? Why not update only when something actually changes?
You can access the parent though parent() and parentWidget(). Remember to cast the result to the proper class pointer (your QMainWindow descendant).
Why update 50 times per second? Why not update only when something actually changes?
You can access the parent though parent() and parentWidget(). Remember to cast the result to the proper class pointer (your QMainWindow descendant).
There is a continu datastream arriving at the comport which need to be visualized, actually
the data is coming from a 4 channel analog/digital-converter which generates 100 samples
per second. So with 1200 pixels on the X-axe one trace takes 12 seconds (I paint one pixel
per sample).
Tnx for the tip, I'm going to try that.
Regards.
"mainwindow.h:140: error: ISO C++ forbids declaration of ‘PainterWidget’ with no type"
I can't include mainwindow.h in painterwidget.h because in mainwindow.h I have already
included painterwidget.h. If I don't include painterwidget.h in mainwindow.h I can not create
a class PainterWiget. If I can't include mainwindow.h in painter.h, how do I cast the parent
widget to the class used in mainwindow.cpp?
I guess I got lost in C++...![]()
Use forward declaration in headers. Further explanation: Circular dependency
J-P Nurmi
I read the article on Wikipedia and now it works
I'm using a refreshrate of 16 fps as well
Tnx wysota and jpn!
Bookmarks