Closed m-nikolaidis closed 3 years ago
Thank you @Marios-Nikolaidis. We are heavily working on ete4, a refactored version of ete where we have added a new visualization module based on web/svg rendering. I guess we could still accept PRs anyways, but the idea is that the tree drawing engine and GUI based on GUI is getting unmaintained and deprecated in future versions.
Regarding the QApplication change, I understand from the Qt5 documentation that there is always a need to have one, and only one, QApplication instance. Maybe the change is ok for embedding purposes but, will the standalone GUI application work without it?
Dear @jhcepas ,
I am glad to hear your extensive work on ete4. I will be gladly to commit there as well. I reviewed your comment and yes you are right. My method would not work on a standalone GUI. Therefore I made some other changes to the GUI functions by adding a child_app kwarg. This new approach works fine when called from script or when using the python interpreter for a standalone GUI. I will be closing this PR and creating a new one.
All the best
Did some minor changes in the QtGUI tree functions and added the ability to change the leaf name colors. Also made the ete QtGUI able to be called from other Qt Application without creating errors (described below). A more detailed description is below. Each change described has a reference point to each script in treeview folder
Treeview
Qt GUI changes
references:
drawer.py: lines 67, 68, 95, 156, 157
When embedding the tree.show() function inside another GUI application (as I am trying to do for a project of mine) the following error occurs.
QCoreApplication::exec: The event loop is already running
since an application is getting called by another application and this is fatal for the main loop.Exiting the first application will not close the second application, which will therefore consume system resources until manually killed. For this reason the QApplication widget can be changed with a QMainWindow widget, since the ete GUI uses only one primary window. As far as I have read the scripts there is no need for an event loop when displaying the window.
f you think that this change is not good feel free to discuss.
Leaf name color attribute
references: