# Hep Needed :Query on using qtgui from gnuradio

**URL:** <https://www.ruby-forum.com/t/hep-needed-query-on-using-qtgui-from-gnuradio/216348>\
**Category:** GNU Radio\
**Created:** [February 2, 2012, 8:05am UTC](https://www.ruby-forum.com/t/hep-needed-query-on-using-qtgui-from-gnuradio/216348 "2012-02-02T08:05:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [February 2, 2012, 8:05am UTC](https://www.ruby-forum.com/t/hep-needed-query-on-using-qtgui-from-gnuradio/216348/1 "2012-02-02T08:05:29Z")

</div>

Hi All

kindly clarify my query on using wxgui of gnuradio to embedd it into  
another application …

I have a necessity to integrate the qtgui window to a parent Qt  
Application.Please let me know if i use the existing function

qtgui.sink\_c (int fftsize, int wintype, double fc=0,  
double bandwidth=1.0, const std::string &name=“Spectrum Display”,  
bool plotfreq=true, bool plotwaterfall=true, bool  
plotwaterfall3d=true, bool plottime=true, bool  
plotconst=true, bool use\_openGL=true, QWidget  
\*parent=NULL)

how to use the argument parent pointer highlighted .

kindly clarify my query on using wxgui of gnuradio to embedd it into  
another application …

I have a necessity to integrate the qtgui window to a parent Qt  
Application.Please let me know if i use the existing function

qtgui.sink\_c (int fftsize, int wintype, double fc=0,  
double bandwidth=1.0, const std::string &name=“Spectrum Display”,  
bool plotfreq=true, bool plotwaterfall=true, bool  
plotwaterfall3d=true, bool plottime=true, bool  
plotconst=true, bool use\_openGL=true, QWidget  
\*parent=NULL)

how to use the argument parent pointer highlighted .

Thanks in advance

Regards

Bharadwaj Desikan

---

<div class="post-metadata">

**Author:** ![bharadwaj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/f1d935/32.png) [@bharadwaj](https://www.ruby-forum.com/u/bharadwaj)\
**Post date:** [February 2, 2012, 8:47am UTC](https://www.ruby-forum.com/t/hep-needed-query-on-using-qtgui-from-gnuradio/216348/2 "2012-02-02T08:47:28Z")

</div>

> I have a necessity to integrate the qtgui window to a parent Qt  
> Application.Please let me know if i use the existing function

If it helps, you can use gnuradio-companion to generate a pyqt  
application with this qtgui sink. Use the generated python code as an  
example. See the Generate Options in the options block and the QT GUI  
Widgets category in the block tree.

-josh

---

<div class="post-metadata">

**Author:** ![bharadwaj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/f1d935/32.png) [@bharadwaj](https://www.ruby-forum.com/u/bharadwaj)\
**Post date:** [February 2, 2012, 3:44pm UTC](https://www.ruby-forum.com/t/hep-needed-query-on-using-qtgui-from-gnuradio/216348/3 "2012-02-02T15:44:14Z")

</div>

On Thu, Feb 2, 2012 at 2:04 AM, bharadwaj desikan  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)wrote:

> how to use the argument parent pointer highlighted .
> 
> Thanks in advance
> 
> Regards
> 
> Bharadwaj Desikan

There’s some confusion with your email in mixing the wxgui and qtgui  
blocks. I’m not sure the two mix.

But if you are focused only on the qtgui applications and using it as  
part  
of a larger Qt project, then you should be able to do this. A good place  
to  
start is gr-qtgui/apps/qt\_digital.py. I embed two qtgui sinks into a  
larger  
project. I don’t use the parent widget, though I probably could have.

Note that this app was written all in Python using PyQT. I’m not sure  
how  
easy you’ll find it to work with the qtgui in a pure C++ environment;  
I’ve  
never tried and it wasn’t designed with that in mind, initially. But the  
qt\_digital.py is still a good place to start for what you are asking  
about.

Tom
