adamerose / PandasGUI

A GUI for Pandas DataFrames
MIT No Attribution
3.18k stars 232 forks source link

App does not fit in the window. #199

Open ko0421 opened 2 years ago

ko0421 commented 2 years ago

pandasgui_screenshot

The pandasgui app does not fit in the window. I have searched as far as I know, but could not find a solution, so I am asking my question here.

When I started pandasgui, I got the following error message With the following error, the display of the launched app does not fit in the window as shown in the attached image. I have checked the version of the package and it seems to meet the requirements, but the problem persists. I am also having trouble understanding the error information that is output.

I would appreciate it if you could tell us how to solve this problem.

show(iris)

PandasGUI INFO — pandasgui.gui — Opening PandasGUI Traceback (most recent call last): File "C:\XXXXXX\AppData\Local\Programs\Python\Python310\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' <pandasgui.gui.PandasGui object at 0x000001A67B691D80>

Windows10 python version is 3.10.2 The other packages version is satisfied requirement.

jakob1379 commented 2 years ago

I get the same error on manjaro, i3 - PyQt v 3.15, pandasgui v. 0.2.13 on python 3.10.4

aazuspan commented 1 year ago

I get the same TypeError every time I call pandasgui.show, although I don't have the window size issue.

File c:\Users\Aaron\miniconda3\envs\fia\lib\site-packages\pandasgui\widgets\find_toolbar.py:308, in ButtonLineEdit.resizeEvent(self, event)
    306 for i, button in enumerate(self.buttons):
    307     buttonSize = button.sizeHint()
--> 308     button.move(
    309         self.rect().right()
    310         - frameWidth
    311         - buttonSize.width() * (i + 1)
    312         - right_margin,
    313         (self.rect().bottom() - buttonSize.height() + 1) / 2 - bottom_margin,
    314     )
    315 super(ButtonLineEdit, self).resizeEvent(event)

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'

Based on the message argument 2 has unexpected type 'float', I was able to get rid of the TypeError by editing line 313 above to use floor division, but I have no idea if that might have other side effects.

button.move(
    self.rect().right()
    - frameWidth
    - buttonSize.width() * (i + 1)
    - right_margin,
-    (self.rect().bottom() - buttonSize.height() + 1) / 2 - bottom_margin,
+    (self.rect().bottom() - buttonSize.height() + 1) // 2 - bottom_margin,
)

I'm running pandasgui==0.2.13, python==3.10.8, and pyqt5==5.15.7