本文整理汇总了Python中dashboard.Dashboard方法的典型用法代码示例。如果您正苦于以下问题:Python dashboard.Dashboard方法的具体用法?Python dashboard.Dashboard怎么用?Python dashboard.Dashboard使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类dashboard
的用法示例。
在下文中一共展示了dashboard.Dashboard方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Login
# 需要导入模块: import dashboard [as 别名]
# 或者: from dashboard import Dashboard [as 别名]
def Login(self):
username = self.txt_username.text()
password = self.txt_pwd.text()
if username == "" and password == "":
QMessageBox.about(self, 'Error', 'Provide a Valid username and password to continue')
else:
cursor = connection.cursor()
sql = "Select * from users where username=%s and pwd=%s"
cursor.execute(sql, (username, password))
result = cursor.fetchall()
if int(len(result)) <= 0:
QMessageBox.about(self, "Error", "Invalid username and password. "
"Provide a valid username and password to continue ")
else:
self.__dashboard__ = Dashboard()
self.__dashboard__.show()
self.close()