(The vec4 can hold "rgba" values if that's what you put in it - the example there just calls it "xyzw" because the data type generically handles any 4 floats.)
Basically, start from an example that draws an image with a simple glsl shader as a texture. Then hack on the shader until it flips around the colors like you want when it draws the texture. Then use your code that gets the image over the network to upload the image as the OpenGL texture every frame.
1st of all, thanks for your effort, I use LyX myself.
The doc says:
this indicates that the widget will paint over its entire area with opaque colors. The widget's area will initially be uninitialized
set the widget's Qt::WA_OpaquePaintEvent, avoiding any unnecessary overhead associated with repainting the widget's background
Meaning it is saying it won't bother painting a background but it's not committing to leaving the old painted background in place so I still think you are relying on undefined behaviour.
On the other hand, I think this also impacts the performance of widgets with Qt::WA_OpaquePaintEvent on macOS so it is probably worth highlighting it with a bug report and/or an email on the mailing list
Yeah i feel like i do sudo apt-get update && upgrade at least once a day. I just checked about SIP and i compiled it from source but i cant remember if i actually used the command make and make install. Does that mean i have to reinstall pyqt5 again? I guess i just open a new thread. Thanks for all the help @SGaist
It might not be the answer but it is a answer. I declare my charts using QML to maintain declarative / visual design.
I only control them from C++ with C++ data. I do all the processing of dynamic axis ranges inside that, I do stupidly high frequency updates.
I'd recommend, if you very frequently update your line series like I do to use: void QXYSeries::replace(QVector<QPointF> points) (or QList...)
and also set your LineSeries to use open GL either from QML or C++ works fine, you do lose some functionality but it saves using canvas (which is slower) if you have lots of points of data, with many fast updates.
I have found a solution that kind of does the job, although takes three times as much memory.
Every update I calculate the difference between the new and the old saturation matrix, this eliminates 60% of the nonzero values, which means it gets drawn that much faster.
As a second layer of optimization I call repaint with a rectangle describing the most important zone, and call update every 60ms.
Actually I did try setting QTabWidget setAutoFillBackground(True) previously, but it didn't work.
Now I tried set VGroupBox setAutoFillBackground(True), then the color changed to light grey which is the exact default color I need.
I have tried to get an example to the problem I saw apparently, but I did not succeed. For a simple radio button it is working, but the layout's margins need to be set to 0 either with setMargin or setContentsMargins.
For the small example I have generated I had introduced also the derived class I used and it seems to work there. Therefore, there must be another problem with the QTableWidget's implementation or I simply fall into a trap.
Well seems that it needs to emit model's layoutChanged() to do what I need. I created new class which inherits QListWidget and there I connected signal to layoutChanged signal of model() object and it worked.
difference between exec() and show(),
Only QDialog have exec() Qwidgets have show.
When you call show on a Dialog, it becomes visible but do not
wait for input.
MyDialog *dia=new MyDialog(this);
int a=0; // this code is run the moment dialog is shown on screen,
int a=0; // this code is run only after dialog is dismissed.
The version of dialog where u call show() could be called floating so when user click ok
it should emit signal that something should happen. ( to maiwindow )
The exec() version will report back the result ok/cancel/closed at once.
learn when to use QObject, QWidget, QFrame
QWidget is often used if making own widget. QFrame is used if you just need something to draw
a frame. If you use Designer you can check out the Widgets that are available.
QDialog is useful for any type of windows that pop ups up or open via a menu.
I have to set anything inside Register.
Yes, Register should be able to give the data back.
the widgets inside are private so you need a function to return the data.
You might also need to call http://doc.qt.io/qt-5/qdialog.html#accept
in your Register buttons clicked slot.