Closed chadkennedyonline closed 2 years ago
I still get this error:
import pandas as pd
import pandasgui as gui
df = pd.DataFrame({'a' : [1, 2], 'b' : [3, 4]})
gui.show(df)
The gui window opens, but freezes (not responding) immediately.
Environment:
Package versions:
ipython==8.2.0
pandasgui==0.2.13
plotly==5.7.0
PyQt5==5.15.6
PyQt5-Qt5==5.15.2
PyQt5-sip==12.10.1
PyQtWebEngine==5.15.5
PyQtWebEngine-Qt5==5.15.2
Cheers, Mads
Describe the bug
![image](https://user-images.githubusercontent.com/13368197/147266823-692ebf6f-a187-40cb-a3af-e48cf445a003.png)
Due to this exception:
Traceback (most recent call last): File "C:\project\lib\site-packages\pandasgui\widgets\find_toolbar.py", line 308, in resizeEvent button.move( TypeError: arguments did not match any overloaded call: move(self, QPoint): argument 1 has unexpected type 'int' move(self, int, int): argument 2 has unexpected type 'float'
This occurs because
(self.rect().bottom() - buttonSize.height() + 1) / 2
is a float, under Python 3, ifself.rect().bottom() - buttonSize.height()
happens to be even. There's no version of move() that takes a float. One fix is to change the expression above to(self.rect().bottom() - buttonSize.height() + 1) // 2
.After the fix is applied, it looks like this:
Note in both cases there's a white horizontal line at the top of the find toolbar. Not sure why it's there, but I believe it's not caused by my fix, since it's in the "before" screenshot as well.
Will submit a PR shortly.
Environment OS: Windows 10 Python: 3.10.1 IDE: PyCharm
Package versions