Repository: napari/napari

Issue:
Napari Info not working in 0.4.13, python 3.10
## 🐛 Bug

The napari info in the drop down menus does no longer work as of Update 0.4.13

## To Reproduce

Steps to reproduce the behavior:

1. install napari 0.4.13
2. open a viewer: `napari` in command line
3. select Help in the drop down menus and then napari info

## Expected behavior

Show the napari info window:
Version etc.

## Environment

 - Please copy and paste the information at napari info option in help menubar here:
   well...
 - Any other relevant information:
  clean environment only napari 0.4.13 installed via `pip install napari[all]`

## Additional context
Error message in command line:
```Python
TypeError                                 Traceback (most recent call last)
File ~/miniconda3/envs/napari_hackaton/lib/python3.10/site-packages/napari/_qt/menus/help_menu.py:17, in HelpMenu.__init__.<locals>.<lambda>(e=False)
     12 def __init__(self, window: 'Window'):
     13     super().__init__(trans._('&Help'), window._qt_window)
     14     ACTIONS = [
     15         {
     16             'text': trans._('napari Info'),
---> 17             'slot': lambda e: QtAbout.showAbout(
        trans = <napari.utils.translations.TranslationBundle object at 0x7ff4d468ac20>
        QtAbout = <class 'napari._qt.dialogs.qt_about.QtAbout'>
        window._qt_window = <napari._qt.qt_main_window._QtMainWindow object at 0x7ff4c5712dd0>
        window = <napari._qt.qt_main_window.Window object at 0x7ff4c5733520>
     18                 window._qt_viewer, window._qt_window
     19             ),
     20             'shortcut': 'Ctrl+/',
     21             'statusTip': trans._('About napari'),
     22         }
     23     ]
     24     populate_menu(self, ACTIONS)

File ~/miniconda3/envs/napari_hackaton/lib/python3.10/site-packages/napari/_qt/dialogs/qt_about.py:98, in QtAbout.showAbout(qt_viewer=<napari._qt.qt_viewer.QtViewer object>, parent=<napari._qt.qt_main_window._QtMainWindow object>)
     86 @staticmethod
     87 def showAbout(qt_viewer, parent=None):
     88     """Display the 'About napari' dialog box.
     89 
     90     Parameters
   (...)
     96         Default is None.
     97     """
---> 98     d = QtAbout(parent)
        QtAbout = <class 'napari._qt.dialogs.qt_about.QtAbout'>
        parent = <napari._qt.qt_main_window._QtMainWindow object at 0x7ff4c5712dd0>
     99     d.setObjectName('QtAbout')
    100     d.setWindowTitle(trans._('About'))

File ~/miniconda3/envs/napari_hackaton/lib/python3.10/site-packages/napari/_qt/dialogs/qt_about.py:70, in QtAbout.__init__(self=<napari._qt.dialogs.qt_about.QtAbout object>, parent=<napari._qt.qt_main_window._QtMainWindow object>)
     67 self.layout.addLayout(self.info_layout)
     69 self.infoTextBox.setText(sys_info(as_html=True))
---> 70 self.infoTextBox.setMinimumSize(
        self.infoTextBox = <PyQt5.QtWidgets.QTextEdit object at 0x7ff4e06d7e20>
        self = <napari._qt.dialogs.qt_about.QtAbout object at 0x7ff4e06d41f0>
     71     self.infoTextBox.document().size().width() + 19,
     72     min(self.infoTextBox.document().size().height() + 10, 500),
     73 )
     75 self.layout.addWidget(QLabel(trans._('<b>citation information:</b>')))
     76 self.citationTextBox = QTextEdit(citation_text)

TypeError: arguments did not match any overloaded call:
  setMinimumSize(self, int, int): argument 1 has unexpected type 'float'
  setMinimumSize(self, QSize): argument 1 has unexpected type 'float'
```



Discussion:
I was unable to reproduce with 
```
conda create -n t python=3.9
conda activate t
pip install napari[all]
napari
```

my suspicion is that this might be a Qt-version specific issue.  Can you tell us what OS you're on, and what PyQt version you ended up with?  (You can get that using `pip list`)
update, i _was_ able to reproduce using python 3.10 and PyQt5 5.15.2
thanks

Resolving patch:
diff --git a/napari/_qt/dialogs/qt_about.py b/napari/_qt/dialogs/qt_about.py
--- a/napari/_qt/dialogs/qt_about.py
+++ b/napari/_qt/dialogs/qt_about.py
@@ -68,8 +68,8 @@ def __init__(self, parent=None):
 
         self.infoTextBox.setText(sys_info(as_html=True))
         self.infoTextBox.setMinimumSize(
-            self.infoTextBox.document().size().width() + 19,
-            min(self.infoTextBox.document().size().height() + 10, 500),
+            int(self.infoTextBox.document().size().width() + 19),
+            int(min(self.infoTextBox.document().size().height() + 10, 500)),
         )
 
         self.layout.addWidget(QLabel(trans._('<b>citation information:</b>')))
@@ -84,13 +84,11 @@ def __init__(self, parent=None):
         self.setLayout(self.layout)
 
     @staticmethod
-    def showAbout(qt_viewer, parent=None):
+    def showAbout(parent=None):
         """Display the 'About napari' dialog box.
 
         Parameters
         ----------
-        qt_viewer : QtViewer
-            QtViewer instance that the `About napari` dialog box belongs to.
         parent : QWidget, optional
             Parent of the dialog, to correctly inherit and apply theme.
             Default is None.
diff --git a/napari/_qt/menus/help_menu.py b/napari/_qt/menus/help_menu.py
--- a/napari/_qt/menus/help_menu.py
+++ b/napari/_qt/menus/help_menu.py
@@ -14,9 +14,7 @@ def __init__(self, window: 'Window'):
         ACTIONS = [
             {
                 'text': trans._('napari Info'),
-                'slot': lambda e: QtAbout.showAbout(
-                    window._qt_viewer, window._qt_window
-                ),
+                'slot': lambda e: QtAbout.showAbout(window._qt_window),
                 'shortcut': 'Ctrl+/',
                 'statusTip': trans._('About napari'),
             }


Test patch:
diff --git a/napari/_qt/dialogs/_tests/test_about.py b/napari/_qt/dialogs/_tests/test_about.py
new file mode 100644
--- /dev/null
+++ b/napari/_qt/dialogs/_tests/test_about.py
@@ -0,0 +1,8 @@
+from napari._qt.dialogs.qt_about import QtAbout
+from napari._tests.utils import skip_local_popups
+
+
+@skip_local_popups
+def test_about(qtbot):
+    wdg = QtAbout()
+    qtbot.addWidget(wdg)