You are not logged in.

1

Thursday, May 31st 2012, 2:53pm

signal , slots , and emit

hello.
I'm creating an opengl/qt interface.
The opengl have a scenegraph and renders all every 2 ms.
I have some entities like line , point , cube eccc.. with a qt model that may be changed every time from a dialog.
I would that when i change a value on a point for example the x position the entity in the dialog change his property at index 0 of the qt model and the rendering system set a var on the shader to the new value.
when i changes a value on the dialog, on the model of the entities must change and all that is take the x entity value from anywhere take the new value.
How i can update a model and signal to each entities connected the change?
with emit?
is like the observer pattern ?where i can bind objects and each object receives a notify when i call "emit"?
thanks.

2

Thursday, May 31st 2012, 5:39pm

make signals, make slots, connect them...

http://lmgtfy.com/?q=qt+signal+slot+tutorial
If you have a problem, CUT and PASTE your code. Do not retype or simplify it. Give a COMPLETE and COMPILABLE example of your problem. Otherwise we are all guessing the problem from a fabrication where relevant details are often missing.

Similar threads