推荐学习书目
› Learn Python the Hard Way
Python Sites
› PyPI - Python Package Index
› http://diveintopython.org/toc/index.html
› Pocoo
值得关注的项目
› PyPy
› Celery
› Jinja2
› Read the Docs
› gevent
› pyenv
› virtualenv
› Stackless Python
› Beautiful Soup
› 结巴中文分词
› Green Unicorn
› Sentry
› Shovel
› Pyflakes
› pytest
Python 编程
› pep8 Checker
Styles
› PEP 8
› Google Python Style Guide
› Code Style from The Hitchhiker's Guide
Nepheshel
V2EX  ›  Python

pyqt5 一运行程序 UI 就崩溃 显示 Python 停止运行

  •  
  •   Nepheshel · Jun 22, 2018 · 3997 views
    This topic created in 3018 days ago, the information mentioned may be changed or developed.
    部分代码:
    def retranslateUi(self, MainWindow):
    _translate = QtCore.QCoreApplication.translate
    MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow"))
    self.label.setText(_translate("MainWindow", "输入验证码"))
    self.label_5.setText(_translate("MainWindow", "获取验证码"))
    self.pushButton_2.setText(_translate("MainWindow", "确定"))
    self.label_7.setText(_translate("MainWindow", "结果"))
    self.pushButton.setText(_translate("MainWindow", "开始生成报表"))
    self.pushButton.clicked.connect(self.on_click_1)

    def on_click_1(self):
    self.withoutCookieLogin(driver,url_login)

    on_click_1 只要一执行 withoutCookieLogin(driver,url_login) UI 就崩溃
    执行其他的 比如 UI 内部程序 self.label_2.setText('请输入验证码') 就没影响
    求大手子指教
    ilucio
        1
    ilucio  
       Jun 23, 2018
    定义 on_click_1 函数时需要传入 driver,url_login 的参数吧
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2714 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 36ms · UTC 08:51 · PVG 16:51 · LAX 01:51 · JFK 04:51
    ♥ Do have faith in what you're doing.