self.layout = QVBoxLayout(); self.setLayout(self.layout) error version 1.1.379 #8971
Replies: 2 comments 4 replies
-
Converting to a discussion since this isn't a bug report. |
Beta Was this translation helpful? Give feedback.
-
last problem has been solved. there is still another problem. I have used pip install pright to install pyright. but when I run pyright in command lind , the returncode is 1. and I got these message Error: 2024-09-13 10:35:18,480 - DEBUG - pyright.node - Checking for global target binary: node i dont't know what i should do to solve these errors. could you help me with this problem |
Beta Was this translation helpful? Give feedback.
-
hello, i am a beginner for pyright. and when I wrote a simple pyqt5 code
from PyQt5 import QtWidgets
from PyQt5.QtWidgets import QDialog, QVBoxLayout, QWidget
class FilterFieldDialog(QDialog):
def init(self, sheet_win, parent=None):
super(FilterFieldDialog, self).init(parent)
self.layout = QVBoxLayout()
self.setLayout(self.layout) -> pyright think this line errors
pyright did show error like this
{
"file": "e:\SVNProjects\H74\Program\Tools\Sunshine3\ExtPlugins\SeaBattleEditor\Src\SeaBattleEditor\Dialog\FilterFieldDialog.py",
"severity": "error",
"message": "Argument of type "() -> QLayout" cannot be assigned to parameter "a0" of type "QLayout" in function "setLayout"\n聽聽"function" is not assignable to "QLayout"",
"range": {
"start": {
"line": 98,
"character": 17
},
"end": {
"line": 98,
"character": 28
}
},
"rule": "reportArgumentType"
},
i don't know why. is there something i did wrong to make this?
hope your help and thank you
Beta Was this translation helpful? Give feedback.
All reactions