# WX GUI Widgets Under C++

**URL:** <https://www.ruby-forum.com/t/wx-gui-widgets-under-c/222356>\
**Category:** GNU Radio\
**Created:** [August 27, 2012, 2:00pm UTC](https://www.ruby-forum.com/t/wx-gui-widgets-under-c/222356 "2012-08-27T14:00:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![aris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/258eb7/32.png) [@aris](https://www.ruby-forum.com/u/aris)\
**Post date:** [August 27, 2012, 2:00pm UTC](https://www.ruby-forum.com/t/wx-gui-widgets-under-c/222356/1 "2012-08-27T14:00:44Z")

</div>

I was wondering if there was any way to use WX GUI Widgets, such as the  
scope and fft plot, in a C++ flowgraph? Are any examples or other  
resources available? I have been designing these flowgraphs based on the  
dial tone example. Thanks ahead of time!

-Dan

---

<div class="post-metadata">

**Author:** ![Daniel\_Labarowski](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/b3f665/32.png) [@Daniel\_Labarowski](https://www.ruby-forum.com/u/Daniel_Labarowski)\
**Post date:** [August 27, 2012, 2:05pm UTC](https://www.ruby-forum.com/t/wx-gui-widgets-under-c/222356/2 "2012-08-27T14:05:10Z")

</div>

On 08/21/2012 08:46 AM, Daniel Labarowski wrote:

> I was wondering if there was any way to use WX GUI Widgets, such as the  
> scope and fft plot, in a C++ flowgraph? Are any examples or other  
> resources available? I have been designing these flowgraphs based on the  
> dial tone example. Thanks ahead of time!

The existing WX widgets and windows in gnuradio are exclusively python.  
You would have to involve python in your application to use them.

Now, the QTGui widgets, those are written and can be used in C++

-josh

---

<div class="post-metadata">

**Author:** ![Daniel\_Labarowski](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/b3f665/32.png) [@Daniel\_Labarowski](https://www.ruby-forum.com/u/Daniel_Labarowski)\
**Post date:** [August 27, 2012, 2:15pm UTC](https://www.ruby-forum.com/t/wx-gui-widgets-under-c/222356/3 "2012-08-27T14:15:58Z")

</div>

Josh,  
Thanks for the reply. The QT Gui Time Sink sounds like it might be  
similar to the scope and the Sink sounds like it might be an fft, but I  
can’t seem to get them to run in GRC. I am receiving the error below. It  
looks like these blocks make a call to top layout which doesn’t exist? I  
built gnuradio using the build-gnuradio script on the 25th of last  
month.

-Dan

_Time Sink_

> Traceback (most recent call last):  
> File “top\_block.py”, line 59, in   
> tb = top\_block()  
> File “top\_block.py”, line 41, in **init**  
> self.top\_layout.addWidget(self.\_qtgui\_time\_sink\_x\_0\_win)  
> File “top\_block.py”, line 94, in **getattr**  
> return getattr(self.\_tb, name)  
> AttributeError: ‘gr\_top\_block\_sptr’ object has no attribute ‘top\_layout’

_Sink_

> Traceback (most recent call last):  
> File “top\_block.py”, line 67, in   
> tb = top\_block()  
> File “top\_block.py”, line 46, in **init**  
> self.top\_layout.addWidget(self.\_qtgui\_sink\_x\_0\_win)  
> File “top\_block.py”, line 94, in **getattr**  
> AttributeError: ‘gr\_top\_block\_sptr’ object has no attribute ‘top\_layout’  
> return getattr(self.\_tb, name)

---

<div class="post-metadata">

**Author:** ![Daniel\_Labarowski](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/b3f665/32.png) [@Daniel\_Labarowski](https://www.ruby-forum.com/u/Daniel_Labarowski)\
**Post date:** [August 27, 2012, 2:16pm UTC](https://www.ruby-forum.com/t/wx-gui-widgets-under-c/222356/4 "2012-08-27T14:16:05Z")

</div>

On 08/21/2012 10:23 AM, Daniel Labarowski wrote:

> Josh,  
> Thanks for the reply. The QT Gui Time Sink sounds like it might be  
> similar to the scope and the Sink sounds like it might be an fft, but I  
> can’t seem to get them to run in GRC. I am receiving the error below. It  
> looks like these blocks make a call to top layout which doesn’t exist? I  
> built gnuradio using the build-gnuradio script on the 25th of last month.

Try changing the options block to qt gui. -josh
