You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Background:
The current GRC top-level python file uses the parse_args method of argparse.ArgumentParser to check command line args. Any arguments not explicitly defined as top-level parameter in the GRC flowgraph will be flagged as an error. The default QT GUI class QApplication and its parent class QGuiApplication support a number of command line arguments that can be useful for configuring (or disabling) the Qt application look and feel.
One specific use case is to run a GUI application on a headless box (e.g. a server) without disabling or removing the GUI elements. By specifying a -platform minimal, or -platform offscreen (-platform being an option to QGuiApplication) the GUI-enabled flowgraph may be executed without requiring a display for those GUI elements, thus reducing the burden of disabling GUI elements in the GRC and, often, maintaining two versions of the flowgraph.
Suggestion:
The relevant line in the current top-level GRC-generated application template reads
which will now ignore arguments intended for the QApplication. This change has the disadvantage of removing checks on arguments to the flowgraph that may be mistyped or otherwise extraneous.
The text was updated successfully, but these errors were encountered:
@nickoe I'm not sure what you're referring to when you say "to pass them on". The parse_known_args method looks for the args that had been configured in the ArgumentParser object prior to its call. You can collect unknown args in the second return value and pass them to the QApplication, that also works. My suggestion was to minimize changed lines. QApplication seems to ignore args it doesn't understand so other than possible mixups if the GR application args somehow match a QApplication arg, the behavior is pretty well defined.
Background:
The current GRC top-level python file uses the parse_args method of argparse.ArgumentParser to check command line args. Any arguments not explicitly defined as top-level parameter in the GRC flowgraph will be flagged as an error. The default QT GUI class QApplication and its parent class QGuiApplication support a number of command line arguments that can be useful for configuring (or disabling) the Qt application look and feel.
One specific use case is to run a GUI application on a headless box (e.g. a server) without disabling or removing the GUI elements. By specifying a
-platform minimal
, or-platform offscreen
(-platform
being an option to QGuiApplication) the GUI-enabled flowgraph may be executed without requiring a display for those GUI elements, thus reducing the burden of disabling GUI elements in the GRC and, often, maintaining two versions of the flowgraph.Suggestion:
The relevant line in the current top-level GRC-generated application template reads
gnuradio/grc/core/generator/flow_graph.py.mako
Line 364 in d8670ae
This could be changed to
which will now ignore arguments intended for the QApplication. This change has the disadvantage of removing checks on arguments to the flowgraph that may be mistyped or otherwise extraneous.
The text was updated successfully, but these errors were encountered: