makehumancommunity / makehuman

This is the main repository for the MakeHuman application as such.
http://www.makehumancommunity.org
Other
1.22k stars 250 forks source link

MakeHuman isn't compatible with PyQt later than 5.12 #77

Closed brothermechanic closed 3 years ago

brothermechanic commented 4 years ago

Screenshot_20200117_163115 Pleease, look at screenshot Scrollbar is on down side but standing poses shows only 2 slots (there are 6 slots) Screenshot_20200117_163331

Aranuvir commented 4 years ago

Further information needed: 1) What's above the "benchmark pose" (first image)? 2) Can you check the log tab for errors?

brothermechanic commented 4 years ago

No errors Please see my screencast 2020-01-18 08-13-19.zip This happend with all scrolls May be problem is in Qt.

Sailsman63 commented 4 years ago

I'm more concerned about the fact that the top entry does not scroll out of view (left hand side)

Instead, the items seem to get 'squashed' vertically to fit all of the items into the same space. I've been dealing with this for a bit... Some long menus are practically unusable after a certain number of entries.

Aranuvir commented 4 years ago

I can confirm the issue with the latest PyQt5 version (5.14.1). Unfortunately MakeHuman uses a custom ScrollArea widget and it looks like the behavior of the QScrollBar widget has changed.

unicornlox commented 4 years ago

I am also having the same problem.

Aranuvir commented 4 years ago

Current workaround: Downgrade PyQt5 to <15.4.1. It could be necessary to setup a virtual environment. Though, using PyQt5 from Ubuntu focal seems to be save a.t.m.

jwcape commented 4 years ago

With macOS 10.15.5: PyQt5 5.13.2 works as expected and PyQt5 5.14.0 does not work

brothermechanic commented 4 years ago

With PyQt5 5.15.0 same problem

AreebDurrani commented 3 years ago

Any progress on this? Have we just given up?

joepal1976 commented 3 years ago

The status is that we've realized that we're at the end of the path with the current UI code. It is unmaintainable and will need to be replaced in order to ensure future viability. We have no solution for solving the 5.14+ problem within the frame of the current UI code.

This is a large refactoring that will take time, it is not a simple fix of one or two lines of code.

We have no prognosis regarding the time frame at the moment.

What we do have is the suggestion to run MakeHuman in venv: http://www.makehumancommunity.org/wiki/FAQ:Scrolling_does_not_work

It should be perfectly possible to run MakeHuman (in venv) with a separate pyqt so as to not have to replace the system version of pyqt.

Aranuvir commented 3 years ago

"Have WE just given up?"

Can't remember I've heard any suggestions to solve the problem from YOU. Though I'm really curious to see some ideas, or even better a solution. (Just in case you need some inspiration: https://docs.python.org/, https://doc.qt.io/). Just to remember: The project is community driven. Everyone is working in her/his free time on the project. Every help to improve the code is welcome.

Joel writes:

"We have no solution for solving the 5.14+ problem within the frame of the current UI code."

I think it should be feasible to fix it, but it's questionable if it's worth the effort in regard of the necessity to rewrite the OpenGL code.

AreebDurrani commented 3 years ago

I have forked the project and I'm trying to come up with a solution. I haven't experienced any problems with the 3d portions of the UI, it's the menus that are broken. I think only the Qt code will have to be rewritten. If I find a solution I will try to commit it to the central repository. This is the first time I've actually worked on an open source project.

As for the question of whether it's worth the effort to fix it: In the short term, probably not. But there will come a day when every distro will no longer support the older versions of pyQt, so it needs to be fixed eventually.

As for the wording in my post, I did not mean any offence. I just wanted to see if my help was needed on the issue.

Aranuvir commented 3 years ago

Sorry for my late reply, real life duties...

As I said, every work fixing issues is welcome. If you want to work on the problem, you should take a look at the VScrollArea class in qtgui. As far as we can tell that's a MakeHuman specific reimplementation of Qt's QScrollArea. It probably would make sense to rewrite the VScrollArea as a derivation of QScrollArea.

As for the question of whether it's worth the effort to fix it: In the short term, probably not. But there will come a day when every distro will no longer support the older versions of pyQt, so it needs to be fixed eventually.

It might make more sense fixing that bug, rather than waiting for a rewrite of the OpenGL code.

mike-9999 commented 3 years ago

Hi, maybe I found a fix for the 'widget on long panes get compressed when scrolling down' issue - at least it worked for me (linux machine, QT 5.15.1): In 'qtgui.py' / Class VScrollLayout / def setGeometry(self, rect):

just replace the last line of the VScrollLayout 'setGeometry' method:

 self._child.setGeometry(rect)  # <-- not working

by:

 self._child.widget().setGeometry(rect) 

Maybe someone can confirm if it also works on other installations and eventuallly merge it into the codebase.

Aranuvir commented 3 years ago

Thank you Mike, your fix seems to do the trick. Pushing to master, though further testing is probably needed. Also thank you AreebDurrani for trying to help.

jwcape commented 3 years ago

Using Mike's fix, MakeHuman 1.2.0 final works with PyQt5==5.15.1 on macOS 10.15.7 Thank you very much.

brothermechanic commented 3 years ago

@mike-9999 wow! this is amazing I can now model comfortably Thanks you all for developing!

joepal1976 commented 3 years ago

That's very nice. This makes it possible to make a ppa build for ubuntu 20.10 too.

cfeck commented 3 years ago

Thank you for the fix! It isn't fixed completely, though. Scrolling using the mouse wheel only works when the mouse cursor is pointing at the scrollbar, but not inside the scrolling area. Should I open a separate ticket?