unresolved reference to QLineEdit.Password?
-
OS : Windows 11
Python : Ver 3.9.16I installed PySide6 packages and basic functions are working well. but when i use "QLineEdit.Password" it says it is unresolved reference.
this is my code :
import hashlib import datetime from PySide6.QtCore import Qt, QSettings from PySide6.QtWidgets import ( QWidget, QLabel, QLineEdit, QVBoxLayout, QPushButton, QCheckBox ) class LoginWindow(QWidget): def __init__(self): super().__init__() # Pre-flight checklist self.preflight_label = QLabel("Pre-Flight Checklist:\n\n" "Check pre-arm parameters of pixhawk\n" "Check weather\n" "Check ship position") self.preflight_label.setAlignment(Qt.AlignCenter) # Login ID and password fields self.id_field = QLineEdit() self.password_field = QLineEdit() self.password_field.setEchoMode(QLineEdit.Password)
-
OS : Windows 11
Python : Ver 3.9.16I installed PySide6 packages and basic functions are working well. but when i use "QLineEdit.Password" it says it is unresolved reference.
this is my code :
import hashlib import datetime from PySide6.QtCore import Qt, QSettings from PySide6.QtWidgets import ( QWidget, QLabel, QLineEdit, QVBoxLayout, QPushButton, QCheckBox ) class LoginWindow(QWidget): def __init__(self): super().__init__() # Pre-flight checklist self.preflight_label = QLabel("Pre-Flight Checklist:\n\n" "Check pre-arm parameters of pixhawk\n" "Check weather\n" "Check ship position") self.preflight_label.setAlignment(Qt.AlignCenter) # Login ID and password fields self.id_field = QLineEdit() self.password_field = QLineEdit() self.password_field.setEchoMode(QLineEdit.Password)
@atmega328 said in unresolved reference to QLineEdit.Password?:
self.password_field.setEchoMode(QLineEdit.Password)
Maybe
self.password_field.setEchoMode(QLineEdit.EchoMode.Password)
-
@atmega328 said in unresolved reference to QLineEdit.Password?:
self.password_field.setEchoMode(QLineEdit.Password)
Maybe
self.password_field.setEchoMode(QLineEdit.EchoMode.Password)
-
@jsulm Oh thank you but it turns out that PyCharm's fault.
it runs very well even if there are unresolved reference warning message.
pycharm seems to be crazy with complex library.
@atmega328 Yes, such things also happen often with QtCreator and C++ code :-)
-
@jsulm Oh thank you but it turns out that PyCharm's fault.
it runs very well even if there are unresolved reference warning message.
pycharm seems to be crazy with complex library.
@atmega328
At Qt6 basically all the enums were changed from living in "global-ish" namespaces to being more specific, e.g. hereQLineEdit.Password
->QLineEdit.EchoMode.Password
.