USEPA / SWMM-EPANET_User_Interface

User interface for the Stormwater-Management-Model
111 stars 66 forks source link

Avoid UI freeze and fix PATH issue under Linux #360

Closed feralber closed 4 years ago

feralber commented 4 years ago

With this small patch I was able to run EPANET UI under Linux (although there are some bugs to be fixed). The main point is avoiding instantiation of QgsApplication, because its documentation says that this class "should be instantiated in place of QApplication", and in this case we already have an instance of QApplication.

TongZhai commented 4 years ago

@feralber There needs to be good detection of underlying OS, then does the QgsApplication init call accordingly. Windows would like to have a local instance to be called upon to launch the QgsApplication and it also serves the purpose of having its own local setting for defaults etc. This is a good start, but as is, it won't launch on windows at the moment with this change. Also, please fork using the 'dev-ui-py3qt5' branch as it is the development branch.

feralber commented 4 years ago

Thank you @TongZhai. I understand. Maybe I could have done some more checking before submitting this PR. I will try do better next time. I think I can close this PR now.