QT GUI Entryvariable_qtgui_entryQT GUI Widgetsfrom PyQt4 import Qtfrom gnuradio import eng_notationself.$(id) = $(id) = $value#set $win = 'self._%s_tool_bar'%$id
$win = Qt.QToolBar(self)
#if not $label()
#set $label = '"%s"'%$id
#end if
$(win).addWidget(Qt.QLabel($label+": "))
self._$(id)_line_edit = Qt.QLineEdit(str(self.$id))
self._$(id)_tool_bar.addWidget(self._$(id)_line_edit)
self._$(id)_line_edit.returnPressed.connect(
lambda: self.set_$(id)($(type.conv)(self._$(id)_line_edit.text().toAscii())))
$(gui_hint()($win))self.set_$(id)($value)self._$(id)_line_edit.setText($(type.str)($id))Labellabelstring#if $label() then 'none' else 'part'#TypetypeintenumpartDefault Valuevalue0$typeGUI Hintgui_hintgui_hintpart
This block creates a variable with a text entry box. \
Leave the label blank to use the variable id as the label.
The GUI hint can be used to position the widget within the application. \
The hint is of the form [tab_id@tab_index]: [row, col, row_span, col_span]. \
Both the tab specification and the grid position are optional.