discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Discuss-gnuradio] Include own GUI in existing QT windows


From: Sebastian Müller
Subject: [Discuss-gnuradio] Include own GUI in existing QT windows
Date: Thu, 9 Jun 2016 14:18:41 +0200

Hi list,

can anyone help me with this? I'm trying to build an own QT GUI, which opens in an own window so far. I want to include my GUI in existing QT windows (like all the gr-qtgui blocks do) so that there is only one window with all the QT content in it.

So far I have configured the <make> call in the GRC XML like this:

<make>#set $win = 'self._%s_win'%$id
inspector.qtgui_inspector_sink_vf($fft_len)
self._$(id)_win = sip.wrapinstance(self.$(id).pyqwidget(), Qt.QWidget)
$(gui_hint()($win))</make>

qtgui_inspector_sink_vf_impl constructor looks like this:

qtgui_inspector_sink_vf_impl(int fft_len, QWidget *parent);

This block creates an instance of "inspector_plot" which inherits QWidget class:

inspector_plot(int fft_len, std::vector<float> *buffer, QWidget* parent) : QWidget(parent).

I also created a PyObject* pyqwidget() in the public header and the impl header and source files (copied from gr-qtgui). When trying to start, the python flowgraph fails because it does not seem to find pyqwidget(): AttributeError: 'qtgui_inspector_sink_vf_sptr' object has no attribute 'pyqwidget'.

Would be great if someone could help with what I'm missing.

Cheers,
Sebastian


reply via email to

[Prev in Thread] Current Thread [Next in Thread]