Skip to content
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

PySide6 compatibility #498

Open
BinanceMan opened this issue Feb 23, 2024 · 3 comments
Open

PySide6 compatibility #498

BinanceMan opened this issue Feb 23, 2024 · 3 comments

Comments

@BinanceMan
Copy link

Hi highfestiva,,

I hope this message finds you well. I wanted to bring to your attention an issue I encountered while using the latest version of finplot with PySide6. Here's a brief overview:

Example: https://github.com/highfestiva/finplot/blob/master/finplot/examples/complicated.py

Error:

Traceback (most recent call last):
File "/home/dev/finplot/complicated.py", line 434, in
ctrl_panel = create_ctrl_panel(ax.vb.win)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/dev/finplot/complicated.py", line 381, in create_ctrl_panel
panel = QWidget(win)
^^^^^^^^^^^^
TypeError: 'PySide6.QtWidgets.QWidget.init' called with wrong argument types:
PySide6.QtWidgets.QWidget.init(FinWindow)
Supported signatures:
PySide6.QtWidgets.QWidget.init(Optional[PySide6.QtWidgets.QWidget] = None, PySide6.QtCore.Qt.WindowType = Default(Qt.WindowFlags))

Operating System: Manjaro
Python: 3.11.6
finplot: 1.9.4

Thank you for your time and for maintaining this awesome project! Let me know if you need any further information.

Best regards,

@highfestiva
Copy link
Owner

I have no idea how to fix this, since I don't use PySide myself. If you do, please post a pull request and I'll verify it.

@BinanceMan
Copy link
Author

Hi highfestiva,

Thank you for your prompt response.

I've thoroughly investigated the issue, attempting to identify an easy fix, but it appears to be more complex than anticipated. The challenge lies in attempting to add a non-QWidget object, specifically a FinWindow (pg.GraphicsLayoutWidget), to a QWidget.

I experimented with other examples, such as 'embed' and 'dockable,' and encountered the same problem consistently. What perplexes me is that these examples work seamlessly in PyQt6 but encounter issues in PySide6. Both PyQt6 and PySide6 are quite similar, particularly in their requirements for adding to QWidget.

My suspicion is that PyQt6 might be more lenient when checking the required types. I would appreciate any insights or suggestions you might have on resolving this issue.

Thank you once again for your assistance.

Best regards,

@Sharker5854
Copy link

@BinanceMan hey! Did you finally solved this problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants