0
0
mirror of https://github.com/bec-project/bec_widgets.git synced 2025-07-14 03:31:50 +02:00

feat: add '--hide' argument to BEC GUI server

This commit is contained in:
2024-11-11 16:52:42 +01:00
committed by guijar_m
parent e9983521ed
commit 1f60fec720

View File

@ -199,6 +199,7 @@ def main():
help="Name of the gui class to be rendered. Possible values: \n- BECFigure\n- BECDockArea", help="Name of the gui class to be rendered. Possible values: \n- BECFigure\n- BECDockArea",
) )
parser.add_argument("--config", type=str, help="Config file or config string.") parser.add_argument("--config", type=str, help="Config file or config string.")
parser.add_argument("--hide", action="store_true", help="Hide on startup")
args = parser.parse_args() args = parser.parse_args()
@ -233,7 +234,8 @@ def main():
gui = server.gui gui = server.gui
win.setCentralWidget(gui) win.setCentralWidget(gui)
win.resize(800, 600) win.resize(800, 600)
win.show() if not args.hide:
win.show()
app.aboutToQuit.connect(server.shutdown) app.aboutToQuit.connect(server.shutdown)