# Changing GUI Sink block params on the fly from a custom C++ block?

**URL:** <https://www.ruby-forum.com/t/changing-gui-sink-block-params-on-the-fly-from-a-custom-c-block/234647>\
**Category:** GNU Radio\
**Created:** [March 19, 2015, 2:27pm UTC](https://www.ruby-forum.com/t/changing-gui-sink-block-params-on-the-fly-from-a-custom-c-block/234647 "2015-03-19T14:27:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![addis\_a](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/c4cdca/32.png) [@addis\_a](https://www.ruby-forum.com/u/addis_a)\
**Post date:** [March 19, 2015, 2:27pm UTC](https://www.ruby-forum.com/t/changing-gui-sink-block-params-on-the-fly-from-a-custom-c-block/234647/1 "2015-03-19T14:27:54Z")

</div>

Hello GNU Radio’ers,

I have a GRC flowgraph with a custom C++ block that feeds a stream of  
vectors of floats to the QT GUI Vector Sink. Which particular internal  
vector of floats gets streamed out of the custom C++ block is set on  
the fly from a QT GUI Chooser. I am using the autoscale on the QT GUI  
Vector Sink.

The autoscale is okay but I do come up against shortcomings with it  
and I could do better if I could somehow have the C++ code for the  
custom C++ block (or the stuff in the GRC flowgraph, but that seems  
more difficult to me) call some function to change the QT GUI Vector  
Sink Y Axis Min and Max on the fly when the param choosing the vector  
is changed.

Would someone please indicate how to do this, if it can be done? And  
perhaps provide a link to a similar example on the web to work from,  
if such exists?

Thanks,  
John

---

<div class="post-metadata">

**Author:** ![MurphyS\_John](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ce7236/32.png) [@MurphyS\_John](https://www.ruby-forum.com/u/MurphyS_John)\
**Post date:** [March 19, 2015, 3:36pm UTC](https://www.ruby-forum.com/t/changing-gui-sink-block-params-on-the-fly-from-a-custom-c-block/234647/2 "2015-03-19T15:36:56Z")

</div>

On Thu, Mar 19, 2015 at 9:26 AM, Murphy, John [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> custom C++ block (or the stuff in the GRC flowgraph, but that seems

In the Vector Sink’s properties, you can set a variable for the y-min  
and  
y-max. When you change the variable (via a slider or in any other way),  
it  
will change the y axis settings.

Tom

---

<div class="post-metadata">

**Author:** ![MurphyS\_John](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ce7236/32.png) [@MurphyS\_John](https://www.ruby-forum.com/u/MurphyS_John)\
**Post date:** [March 19, 2015, 3:53pm UTC](https://www.ruby-forum.com/t/changing-gui-sink-block-params-on-the-fly-from-a-custom-c-block/234647/3 "2015-03-19T15:53:37Z")

</div>

Thanks, got it.  
John M.  
removed\_email\_address@domain.invalid
