Hello,
I am a running FC with its GUI in a python subprocess macro.
OS is ubuntu 20.04 on Linux. FC is 0.19.
However during the process the FC window appears to fit all the screen.
I would like to have it more discrete as a reduced window or a minimized banner.
How could this done?
Thank you for your help
reduced or minimized FC window
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
reduced or minimized FC window
Last edited by Oli772 on Sat Aug 20, 2022 5:34 am, edited 1 time in total.
Re: reduced or minimized FC window
Hello please add information required in IMPORTANT post at top of this forum.
Without proper version information it is hard to supply a solution as something may differ depending on OS and libraries versions.
It is however difficult to use "FreeCAD as a library", and to interact with the MainWindow of FC if OS is unknown as something may depend on the OS used.
Regards
Carlo D.
Without proper version information it is hard to supply a solution as something may differ depending on OS and libraries versions.
It is however difficult to use "FreeCAD as a library", and to interact with the MainWindow of FC if OS is unknown as something may depend on the OS used.
Regards
Carlo D.
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.
Blog: https://okkmkblog.wordpress.com/
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.
Blog: https://okkmkblog.wordpress.com/
Re: reduced or minimized FC window
Something like
Code: Select all
mw=FreeCADGui.getMainWindow()
mw.setWindowState(mw.windowState() & QtCore.Qt.WindowMinimized)
Re: reduced or minimized FC window
thank you,
but what I get then is:
but what I get then is:
name 'QtCore' is not defined
Re: reduced or minimized FC window
Code: Select all
from PySide2 import QtCore
Re: reduced or minimized FC window
Thank you very much, that works: the FC starts reduced then minimized.
Do you know how it could be right minimized from the start ?
here the start of my script:
Do you know how it could be right minimized from the start ?
here the start of my script:
Code: Select all
from __future__ import unicode_literals
__title__= ".."
__author__= ".."
__date__= ".."
__version__= "..."
import sys
# add folder containing FreeCAD.pyd, FreeCADGui.pyd to sys.path
sys.path.append("/usr/lib/freecad/lib")
import FreeCAD, FreeCADGui
import ImportGui
from PySide2 import QtCore
mw=FreeCADGui.getMainWindow()
mw.setWindowState(mw.windowState() & QtCore.Qt.WindowMinimized)
from FreeCAD import Base
import Draft, PartDesign, Part, Import
import BOPTools.SplitFeatures
#import _CommandCompoundFilter
import CompoundTools.CompoundFilter
doc = App.newDocument()