# QT GUI Text Panel for my custom C++ block

**URL:** <https://www.ruby-forum.com/t/qt-gui-text-panel-for-my-custom-c-block/241795>\
**Category:** GNU Radio\
**Created:** [April 30, 2015, 8:46pm UTC](https://www.ruby-forum.com/t/qt-gui-text-panel-for-my-custom-c-block/241795 "2015-04-30T20:46:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Detlef\_R](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/58f4c7/32.png) [@Detlef\_R](https://www.ruby-forum.com/u/Detlef_R)\
**Post date:** [April 30, 2015, 8:46pm UTC](https://www.ruby-forum.com/t/qt-gui-text-panel-for-my-custom-c-block/241795/1 "2015-04-30T20:46:07Z")

</div>

So… I just want to say a public “thanks” to Volker S. for his  
work on the gr-display module.

It is not only functional, but the part of it that handles the QT  
displays is separated enough, and simple enough, to make it seem like  
a usable exemplar of how to handle basic QT GUI programming in GNU  
Radio.

I copied his code in the show\_text block into my block in order to add  
a text display panel functionality without having to route it via the  
flowgraph and comply with the restrictions the scheduler would place  
on it w.r.t rate etc.

I was able to do this while essentially taking his code files verbatim  
for the show\_text\_window, and copying his modifications to the  
gr-display makefile into my own module’s makefile.

And, for the moment, everything works. I even repeated the process for  
another of my custom C++ blocks in that module which is also much  
better having its own text display panel. Mind you anything outside  
the work functions all still seem like a bunch of “monkey see, monkey  
do” but at least I managed to follow enough for that. I mean, my text  
panel still has the clear and file save buttons on it from  
show\_text\_window! So at some point I will have to dig a little into  
the .ui file and adjust some things.

This is something which seems to me like it would make a useful  
tutorial if someone knew enough about the subject to write it up.

I do have some trepidation about what happens when I add another block  
to the module and gr\_modtool might wipe out my makefile edits. Not  
sure if it would do that, but maybe.

So, anyhow, again, “thanks”. There are a lot of people who do stuff  
that makes this project so usable (for me build-gnuradio and  
gr\_modtool are HUGE helpers in particular without which I might not be  
able to use GNU Radio at all) and hopefully they get some satisfaction  
out of knowing someone really, really found their stuff useful and  
enabling.

Having been inspired by that small success I am looking into the QT  
Vector Sink as I have a chance, to see if I can manage something  
similar to provide vector graph support to a custom block.

- John
