Repository: spyder-ide/spyder

Issue:
TypeError when pressing Ctrl+Shift+Tab in the Editor
## Description

### What steps will reproduce the problem?

<!--- You can use Markdown here --->

1. Press Ctrl+shift+tab

Those are all the steps you need to reproduce. I am writing this 2 sentences because of the character minimum.

### Traceback
```python-traceback
Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/spyder/plugins/editor/widgets/editor.py", line 453, in <lambda>
    lambda: self.tab_navigation_mru(forward=False),
  File "/usr/lib/python3.10/site-packages/spyder/plugins/editor/widgets/editor.py", line 2170, in tab_navigation_mru
    self.tabs_switcher = TabSwitcherWidget(self, self.stack_history,
  File "/usr/lib/python3.10/site-packages/spyder/plugins/editor/widgets/editor.py", line 88, in __init__
    self.set_dialog_position()
  File "/usr/lib/python3.10/site-packages/spyder/plugins/editor/widgets/editor.py", line 136, in set_dialog_position
    self.move(self.editor.mapToGlobal(QPoint(left, top)))
TypeError: arguments did not match any overloaded call:
  QPoint(): too many arguments
  QPoint(int, int): argument 1 has unexpected type 'float'
  QPoint(QPoint): argument 1 has unexpected type 'float'
```

## Versions

* Spyder version: 5.1.5 
* Python version: 3.10.0
* Qt version: 5.15.2
* PyQt5 version: 5.15.6
* Operating System: Linux 5.15.6-200.fc35.x86_64

### Dependencies

```

# Mandatory:
atomicwrites >=1.2.0          :  1.4.0 (OK)
chardet >=2.0.0               :  4.0.0 (OK)
cloudpickle >=0.5.0           :  1.6.0 (OK)
cookiecutter >=1.6.0          :  1.7.3 (OK)
diff_match_patch >=20181111   :  20200713 (OK)
intervaltree >=3.0.2          :  3.1.0 (OK)
IPython >=7.6.0               :  7.26.0 (OK)
jedi >=0.17.2;<0.19.0         :  0.18.0 (OK)
jsonschema >=3.2.0            :  3.2.0 (OK)
keyring >=17.0.0              :  21.8.0 (OK)
nbconvert >=4.0               :  6.1.0 (OK)
numpydoc >=0.6.0              :  1.1.0 (OK)
parso >=0.7.0;<0.9.0          :  0.8.2 (OK)
pexpect >=4.4.0               :  4.8.0 (OK)
pickleshare >=0.4             :  0.7.5 (OK)
psutil >=5.3                  :  5.8.0 (OK)
pygments >=2.0                :  2.9.0 (OK)
pylint >=2.5.0                :  2.9.6 (OK)
pyls_spyder >=0.4.0           :  0.4.0 (OK)
pylsp >=1.2.2;<1.3.0          :  1.2.2 (OK)
pylsp_black >=1.0.0           :  None (OK)
qdarkstyle =3.0.2             :  3.0.2 (OK)
qstylizer >=0.1.10            :  0.2.0 (OK)
qtawesome >=1.0.2             :  1.0.3 (OK)
qtconsole >=5.1.0             :  5.1.1 (OK)
qtpy >=1.5.0                  :  1.11.2 (OK)
rtree >=0.9.4                 :  0.9.4 (OK)
setuptools >=49.6.0           :  57.4.0 (OK)
sphinx >=0.6.6                :  4.1.2 (OK)
spyder_kernels >=2.1.1;<2.2.0 :  2.1.1 (OK)
textdistance >=4.2.0          :  4.2.0 (OK)
three_merge >=0.1.1           :  0.1.1 (OK)
watchdog >=0.10.3             :  2.1.6 (OK)
xdg >=0.26                    :  0.27 (OK)
zmq >=17                      :  22.2.1 (OK)

# Optional:
cython >=0.21                 :  None (OK)
matplotlib >=2.0.0            :  3.5.0 (OK)
numpy >=1.7                   :  1.21.1 (OK)
pandas >=1.1.1                :  1.3.3 (OK)
scipy >=0.17.0                :  1.7.0 (OK)
sympy >=0.7.3                 :  None (OK)
```



Discussion:
Hi @gabrc52,

I'm unable to reproduce this issue, can you please post a gif with the behavior on your end? Also, please update your Spyder to see if the error persists in the newer version.

Thanks for reporting!

Resolving patch:
diff --git a/spyder/plugins/editor/widgets/editor.py b/spyder/plugins/editor/widgets/editor.py
--- a/spyder/plugins/editor/widgets/editor.py
+++ b/spyder/plugins/editor/widgets/editor.py
@@ -130,9 +130,9 @@ def select_row(self, steps):
 
     def set_dialog_position(self):
         """Positions the tab switcher in the top-center of the editor."""
-        left = self.editor.geometry().width()/2 - self.width()/2
-        top = (self.editor.tabs.tabBar().geometry().height() +
-               self.editor.fname_label.geometry().height())
+        left = int(self.editor.geometry().width()/2 - self.width()/2)
+        top = int(self.editor.tabs.tabBar().geometry().height() +
+                  self.editor.fname_label.geometry().height())
 
         self.move(self.editor.mapToGlobal(QPoint(left, top)))
 


Test patch: