-
Notifications
You must be signed in to change notification settings - Fork 478
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
QT5 support to run on macOS 10.12.x (and other OS) #269
Comments
So far we found no reason to move to Qt5 but this sounds like a good one. Do you think it will help packaging the app for Mac? (see ticket #231, I passed a lot of time trying to fix that without success ...) Our usage of webkit is limited to a single tab so I would not be too worried about that (and we use it for the GPS map that does not work anymore so we have to fix it anyway). If you remove the gps tab, does it look easy to port? |
@ataffanel A packaged app would be awesome - but in the meantime I've got the initial interface running with QT5, and can connect to my crazyflie, but I can't get the input devices tab to work. https://github.com/sighmon/crazyflie-clients-python/tree/qt5 This is the file that crashes out: src/cfclient/ui/dialogs/inputconfigdialogue.py Error:
I'm not sure what I'm supposed to be handing in to It's also crashing on disconnect:
And it doesn't actually seem to be receiving (or maybe just displaying) data back from the crazyflie when connected.. but it starts, so that's something. :-) |
Thanks! I am testing your branch to see if I can help. I found that pyQT5 is finally available in pypi so it can be installed with pip, this was the most problematic dependency and so we might soon be able to install cfclient with just One first problem I encounter is that QtWebEngineWidgets is not part of ubuntu/debian yet: https://bugs.launchpad.net/ubuntu/+source/qtbase-opensource-src/+bug/1579265. But there is a package called python3-pyqt5.qtwebkit so it seems that qtwebkit is still part or pyqt5. For now, I am disabling the gps tab and testing the rest. |
I have pushed a couple of fix:
For me getting data from the Crazyflie and flying works well. I am investigating the crash at disconnect and I found new problems that I am looking at too:
I am pushing commits on a clone of your branch: https://github.com/ataffanel/crazyflie-clients-python/tree/qt5. If you pull my changes we can work on the same code. |
@ataffanel Awesome, thanks. I've pulled that in now, but when my PS3 remote is connected via Bluetooth or USB it crashes cfclient with error:
|
I saw crash yesterday, it is great that you got a trace since I got nothing. Now there is a chance to find what it is at least. This seems to be about the threads. we have a lot of threads running in the client and apparently MacOS is not happy about running something outside of the main thread, now we need to find what this something is and why it was not a problem with Qt4. |
@ataffanel the trace didn't help me much though.. I haven't done a lot of python debugging, and couldn't find the thread call that was throwing the NSInternalInconsistencyException. |
The trace comes directly from Mac-os, apparently we are calling GUI things in non-gui context. Maybe related to my changes with the timer, it definitely seems to come from SDL in any case not from QT. One thing I can think off would be to put all signals related to the gamepad in the main thread context. QT will then execute the signal handler in the main thread. |
Any news? |
@dgellow I don't know enough about QT5 threading to know how to fix the problems, sorry! So it's in the hands of @ataffanel for now. |
There is still the same problem related to threads (more related to the OS than to QT, its mac OS that is crashing us). By the way I discovered that miniconda (the python environment I use on Windows) works on Mac to run the QT4 client, but I saw a bug so maybe some other mac could test to see if the bug comes from my machine or from QT4: #273. |
* develop: bitcraze#280 Refactoring of input device config file handling. Changed name of LoPo graph (bitcraze#276) Enable the Loco Positioning tab. Closes bitcraze#276 bitcraze#276 Improved scaling/scrolling of graphs in Lo Po tab. Supporting variable nr of anchors by only subscribing to available ranges. Changed layout of local positioning tab (bitcraze#276) bitcraze#276 Change size of anchors when highlighted bitcraze#276 Added dynamic color of anchors to show that the copter is in the vicinity of an anchor bitcraze#276 Added basic graphing of anchors and position for the Loco Positioning tab Added “Clear” and “Task dump” buttons to the console tab. Closes bitcraze#278 bitcraze#276 Fixed flake8 problem bitcraze#276 Logging of estimated position in LoPo tab bitcraze#227 Removed examples that have been moved to the lib bitcraze#269 Collecting anchor positions and ranges in the LoPo tab bitcraze#276 Spike for the Loco Positioning tab bitcraze#269 Updated readme with information for OS X on pyqt 4 VS 5 Update readme.md with windows pycharm setup Closes bitcraze#275: Save and restore main window size use all joystick hat motions and extract method Add Arnaud's suggestions Add QScrollArea to support resizing the main window
I ran into a problem on my Mac where I had QT4 working and then installed QT5. After that QT4 stopped working and further more it turned out to be impossible(?) to fix QT4 again. In my opinion QT5 is becoming urgent. This is also a warning to Mac users (and possibly other OSes), if you have QT4 working with the client, do not install QT5 as it might mess up QT4. |
We are using the dev-pyqt5 branch for the work of converting to QT5. We are trying to finish it this week and have decided to document any issues we see as comments in this ticket during this week. If any problems remain after this week we will create separate issues at that point. |
|
|
|
|
TODOWe need to update readme instructions for
|
|
…sing resource files. Did not work on Mac for unknown reasons.
The Qt5 port is finally completed and merged! Thanks @sighmon for the original port and help. |
Trying
brew install qt
on macOS 10.12.1 now gives the widely reported:This formula either does not compile or function as expected on macOS versions newer than El Capitan due to an upstream incompatibility.
Installing
brew install qt5
works fine.Are there any plans to update this repo to support QT5?
I did some find/replace from source, but notice that QtWebKit isn't included anymore:
from PyQt5 import QtWebKit ImportError: cannot import name 'QtWebKit'
:-(So the migration process might be a little more involved.
The text was updated successfully, but these errors were encountered: