Hi Forum
I'm using the latest version of FreeCAD on Windows 11.
I'm wondering how to add customized buttons in mainwindow.
See attached image as an example, the default rotation tool.
Looking forward to hearing from you.
Best Regards,
Mea08kw
[Solved]How to add buttons in mainwindow?
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
[Solved]How to add buttons in mainwindow?
- Attachments
-
- example.png (4.02 KiB) Viewed 1193 times
Last edited by mea08kw on Mon Feb 06, 2023 1:19 am, edited 1 time in total.
Re: How to add buttons in mainwindow?
Hello, it is difficult to guess what you are wanting to do.
The navicube is on the "3d view" window.
"3d view" is very different from mainwindow that is usually intended as the main FreeCAD window, that you will obtain using:
Code: Select all
mw = FreeCADGui.getMainWindow()
What do you intend for mainwindow?
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: How to add buttons in mainwindow?
Hi Carloonekk wrote: ↑Tue Jan 10, 2023 8:18 amHello, it is difficult to guess what you are wanting to do.
The navicube is on the "3d view" window.
"3d view" is very different from mainwindow that is usually intended as the main FreeCAD window, that you will obtain using:
"3d view" is different from other part of FreeCAD as it is manage by Coin3D (pivy) so it have a totally different behaviour than "Qt based windows".Code: Select all
mw = FreeCADGui.getMainWindow()
What do you intend for mainwindow?
Regards
Carlo D.
Thanks for your reply.
What I want to do is to put some customized buttons in mainwindow to execute my own python functions(e.g. generating a cube).
In FreeCAD, we could simply add command buttons in toolbar area.
If I could add buttons like "3d view" in mainwindow, I assume the human-software interaction may improve somehow.
Best Regards,
Mea08kw
Re: How to add buttons in mainwindow?
Thanks a million, Jolbas.Jolbas wrote: ↑Thu Jan 12, 2023 7:14 am Maybe the PieMenu addon is for you.
/viewtopic.php?t=29108
https://github.com/triplus/PieMenu
This widget indeed is what I expected.
Maybe its mechanism is different from "3d view" navi cube, anyway it reaches my goal.
Thanks again.
Best Regards,
Mea08kw