2012-06-05 2 views
2

QObject : 다른 스레드에있는 부모에 대해 자식을 만들 수 없습니다. 내가 코드를 알고pyqt QObject : 다른 스레드에있는 부모에 대해 자식을 만들 수 없습니다.

: 여기 을 PyQt는 새로운 오전 있기 때문에 (부모가 QTextDocument은 (0x9919018)는, 부모의 스레드 코드 미안 현재의 thread가 오류가 의미 (0x97b4c10) flooderthread한다 QThread (0x97331e0)입니다입니다입니다 아직 끝나지하지만 내가 여기 의도의 측면에서, 여러분의 코드에 어떤 일이 일어나고 있지만, 무슨 거의 아무 생각이 ... 내가 문제가 myfun.log 기능을 추측

#! /usr/bin/python 
# -*- coding: utf-8 -*- 
import urllib, urllib2, itertools, threading, cookielib, Cookie, sys, time, hashlib, os 
from PyQt4 import QtCore, QtGui 
try: 
    _fromUtf8 = QtCore.QString.fromUtf8 
except AttributeError: 
    _fromUtf8 = lambda s: s 
gui=QtGui.QApplication.processEvents 
texttoset="" 
class fun(): 
    global texttoset 
    def checkpassword(self): 
     if ui.passwordcheck.isChecked()==True: 
      return 1 
     else : 
      return 0 
    def log(self, text): 
     if text != False: 
      firsttext=str(ui.console.toPlainText()) 
      secondtext=firsttext+text+"\n" 
      ui.console.setText(secondtext) 
      log=open("log.log", "a") 
      log.write(text+"\n") 
      log.close() 
     else : 
      firsttext=str(ui.console.toPlainText()) 
      secondtext=firsttext+texttoset+"\n" 
      ui.console.setText(secondtext) 
      log=open("log.log", "a") 
      log.write(texttoset+"\n") 
      log.close() 
    def disable(self): 
     MainWindow.setEnabled(False) 
     pass 
    def enable(self): 
     MainWindow.setEnabled(True) 
     pass 
    def checkmethod(self): 
     if ui.get.isChecked()==True: 
      return 1 
     elif ui.post.isChecked()==True: 
      return 2 
     else : 
      return 0 
    def main(self): 
     connecter() 
     gui() 
     f1.start() 
     gui() 
     time.sleep(3) 
     gui() 
     f2.start() 
     gui() 
     time.sleep(3) 
     gui() 
     f3.start() 
     gui() 
     time.sleep(3) 
     gui() 
     f4.start() 
     gui() 
     time.sleep(3) 
     gui() 
     f5.start() 
     gui() 
     self.sleep(3) 
     gui() 
     f6.start() 
     gui() 
    def killer(self): 
     f1.terminate() 
     f2.terminate() 
     f3.terminate() 
     f4.terminate() 
     f5.terminate() 
     f6.terminate() 
    def close(self): 
     self.killer() 
     os.abort() 
     sys.exit() 

myfun=fun() 
def connecter(): 
    QtCore.QObject.connect(f1, QtCore.SIGNAL("log(bool)"), myfun.log) 
    QtCore.QObject.connect(f1, QtCore.SIGNAL("enable()"), myfun.enable) 
    QtCore.QObject.connect(f1, QtCore.SIGNAL("disable()"), myfun.disable) 

    QtCore.QObject.connect(f2, QtCore.SIGNAL("log(bool)"), myfun.log) 
    QtCore.QObject.connect(f2, QtCore.SIGNAL("enable()"), myfun.enable) 
    QtCore.QObject.connect(f2, QtCore.SIGNAL("disable()"), myfun.disable) 


    QtCore.QObject.connect(f3, QtCore.SIGNAL("log(bool)"), myfun.log) 
    QtCore.QObject.connect(f3, QtCore.SIGNAL("enable()"), myfun.enable) 
    QtCore.QObject.connect(f3, QtCore.SIGNAL("disable()"), myfun.disable) 


    QtCore.QObject.connect(f4, QtCore.SIGNAL("log(bool)"), myfun.log) 
    QtCore.QObject.connect(f4, QtCore.SIGNAL("enable()"), myfun.enable) 
    QtCore.QObject.connect(f4, QtCore.SIGNAL("disable()"), myfun.disable) 


    QtCore.QObject.connect(f5, QtCore.SIGNAL("log(bool)"), myfun.log) 
    QtCore.QObject.connect(f5, QtCore.SIGNAL("enable()"), myfun.enable) 
    QtCore.QObject.connect(f5, QtCore.SIGNAL("disable()"), myfun.disable) 


    QtCore.QObject.connect(f6, QtCore.SIGNAL("log(bool)"), myfun.log) 
    QtCore.QObject.connect(f6, QtCore.SIGNAL("enable()"), myfun.enable) 
    QtCore.QObject.connect(f6, QtCore.SIGNAL("disable()"), myfun.disable) 
x=0 
num=0 
class flooderthread(QtCore.QThread): 
    global texttoset 
    def __init__(self, x, num): 
     QtCore.QThread.__init__(self) 
     self.x=x 
     self.num=num 
    def log(self, text): 
     texttolog=str(text) 
     time.sleep(1) 
     self.emit(QtCore.SIGNAL("log(bool)"), False) 
     time.sleep(2) 
    def enable(self): 
     time.sleep(1) 
     self.emit(QtCore.SIGNAL("enable()")) 
    def disable(self): 
     time.sleep(1) 
     self.emit(QtCore.SIGNAL("disable()")) 
    def run(self): 
     connecter() 
     self.log("\n\n--------------------------------------------------new session-------------------------------------\n\n") 
     itered=False 
     gui() 
     self.disable() 
     gui() 
     self.log("setting params...") 
     param={ui.dataname1.text():ui.datavalue1.text(),ui.dataname3.text():ui.datavalue3.text(),ui.dataname3.text():ui.datavalue3.text(), } 
     self.log("checking password...") 
     if myfun.checkpassword()==1: 
      itered=True 
      self.log("password is true") 
     else : 
      self.log("password is null ") 
      self.log("itered operation") 
     self.log("setting url") 
     url=str(ui.url.text()) 
     if url[:4]!="http" and url[:3]!="ftp": 
      self.log("url error exiting the whole function") 
      self.log("please set a valide protocole!!") 
      gui() 
      self.enable() 
      gui() 
      return 1 
      pass 
     else : 
      self.log("valid url") 
      gui() 
      self.log("url is "+url) 
     self.log("setting proxy") 
     proxy="http://"+ui.proxyuser.text()+":"+ui.proxypass.text()+"@"+ui.proxyhost.text()+":"+ui.proxyport.text() 
     self.log("proxy is "+proxy) 
     gui() 
     self.log("preparing params...") 
     urlparam=urllib.urlencode(param) 
     gui() 
     self.log("params are "+urlparam) 
     self.log("setting up headers...") 
     header={'User-Agent':str(ui.useragent.toPlainText())} 
     self.log("headers are "+ str(header)) 
     self.log("setting up proxy handler..") 
     proxyhandler=urllib2.ProxyHandler({"http":str(proxy)}) 
     self.log("checking method") 
     if myfun.checkmethod()==1: 
      self.log("method is get..") 
      self.log("setting request..") 
      finalurl=url+urlparam 
      gui() 
      self.log("final url is"+finalurl) 
      req=urllib2.Request(finalurl, None, headers) 
     elif myfun.checkmethod()==2: 
      self.log("method is post...") 
      self.log("setting request..") 
      finalurl=url 
      gui() 
      self.log("final url is "+finalurl) 
      req=urllib2.Request(finalurl, urlparam, header) 
     else : 
      self.log("error has been accourded") 
      self.log("please select a method!!") 
      gui() 
      self.log("exiting the whole functions") 
      gui() 
      self.enable() 
      return 1 
      pass 
     self.log("intilizing cookies..") 
     c1=Cookie.SimpleCookie() 
     c1[str(ui.cookiename1.text())]=str(ui.cookievalue1.text()) 
     c1[str(ui.cookiename1.text())]['path']='/' 
     c1[str(ui.cookiename2.text())]=str(ui.cookievalue2.text()) 
     c1[str(ui.cookiename2.text())]['path']='/' 
     c1[str(ui.cookiename3.text())]=str(ui.cookievalue3.text()) 
     c1[str(ui.cookiename3.text())]['domain']=url 
     c1[str(ui.cookiename3.text())]['path']='/' 
     c1[str(ui.cookiename4.text())]=str(ui.cookievalue4.text()) 
     c1[str(ui.cookiename4.text())]['domain']=url 
     c1[str(ui.cookiename4.text())]['path']='/' 
     self.log("cookies are.. :"+str(c1)) 
     cj=cookielib.CookieJar() 
     cj.set_cookie(c1) 
     opener = urllib2.build_opener(proxyhandler, urllib2.HTTPCookieProcessor(cj)) 
     self.log("insatlling opener") 
     urllib2.install_opener(opener) 
     self.log("setting the two operations....") 
     if itered==Fasle: 
      self.log("starting the flooding loop") 
      gui() 
      while true: 
       try: 
        gui() 
        opener.open(req) 
       except e: 
        self.log("error connecting : "+e.reason) 
        self.log("will continue....") 
        continue 
       gui() 

     elif itered==True: 
      pass 
f1=flooderthread(1, 1) 
f2=flooderthread(2, 2) 
f3=flooderthread(3, 3) 
f4=flooderthread(4, 4) 
f5=flooderthread(5, 5) 
f6=flooderthread(6, 6) 
class Ui_MainWindow(object): 
    def setupUi(self, MainWindow): 
     MainWindow.setObjectName(_fromUtf8("MainWindow")) 
     MainWindow.setMinimumSize(QtCore.QSize(838, 500)) 
     MainWindow.setMaximumSize(QtCore.QSize(838, 500)) 
     MainWindow.setWindowTitle(QtGui.QApplication.translate("MainWindow", "memo flooder", None, QtGui.QApplication.UnicodeUTF8)) 
     self.centralwidget = QtGui.QWidget(MainWindow) 
     self.centralwidget.setObjectName(_fromUtf8("centralwidget")) 
     self.console=QtGui.QTextEdit(self.centralwidget) 
     self.console.setGeometry(10, 350, 800,130) 
     self.console.setReadOnly(True) 
     self.console.setObjectName("console") 
     self.groupBox = QtGui.QGroupBox(self.centralwidget) 
     self.groupBox.setGeometry(QtCore.QRect(30, 50, 71, 80)) 
     self.groupBox.setTitle(QtGui.QApplication.translate("MainWindow", "method:", None, QtGui.QApplication.UnicodeUTF8)) 
     self.groupBox.setObjectName(_fromUtf8("groupBox")) 
     self.post = QtGui.QRadioButton(self.groupBox) 
     self.post.setGeometry(QtCore.QRect(10, 20, 61, 22)) 
     self.post.setText(QtGui.QApplication.translate("MainWindow", "post", None, QtGui.QApplication.UnicodeUTF8)) 
     self.post.setChecked(True) 
     self.post.setObjectName(_fromUtf8("post")) 
     self.get = QtGui.QRadioButton(self.groupBox) 
     self.get.setGeometry(QtCore.QRect(10, 50, 51, 22)) 
     self.get.setText(QtGui.QApplication.translate("MainWindow", "get", None, QtGui.QApplication.UnicodeUTF8)) 
     self.get.setObjectName(_fromUtf8("get")) 
     self.url = QtGui.QLineEdit(self.centralwidget) 
     self.url.setGeometry(QtCore.QRect(70, 20, 671, 27)) 
     self.url.setInputMethodHints(QtCore.Qt.ImhUrlCharactersOnly) 
     self.url.setObjectName(_fromUtf8("url")) 
     self.groupBox_2 = QtGui.QGroupBox(self.centralwidget) 
     self.groupBox_2.setGeometry(QtCore.QRect(110, 50, 371, 111)) 
     self.groupBox_2.setTitle(QtGui.QApplication.translate("MainWindow", "data:", None, QtGui.QApplication.UnicodeUTF8)) 
     self.groupBox_2.setObjectName(_fromUtf8("groupBox_2")) 
     self.dataname1 = QtGui.QLineEdit(self.groupBox_2) 
     self.dataname1.setGeometry(QtCore.QRect(20, 30, 101, 27)) 
     self.dataname1.setObjectName(_fromUtf8("dataname1")) 
     self.label = QtGui.QLabel(self.groupBox_2) 
     self.label.setGeometry(QtCore.QRect(40, 10, 67, 17)) 
     self.label.setText(QtGui.QApplication.translate("MainWindow", "name:", None, QtGui.QApplication.UnicodeUTF8)) 
     self.label.setObjectName(_fromUtf8("label")) 
     self.dataname2 = QtGui.QLineEdit(self.groupBox_2) 
     self.dataname2.setGeometry(QtCore.QRect(130, 30, 113, 27)) 
     self.dataname2.setObjectName(_fromUtf8("dataname2")) 
     self.dataname3 = QtGui.QLineEdit(self.groupBox_2) 
     self.dataname3.setGeometry(QtCore.QRect(250, 30, 113, 27)) 
     self.dataname3.setObjectName(_fromUtf8("dataname3")) 
     self.label_2 = QtGui.QLabel(self.groupBox_2) 
     self.label_2.setGeometry(QtCore.QRect(40, 60, 67, 17)) 
     self.label_2.setText(QtGui.QApplication.translate("MainWindow", "value:", None, QtGui.QApplication.UnicodeUTF8)) 
     self.label_2.setObjectName(_fromUtf8("label_2")) 
     self.datavalue1 = QtGui.QLineEdit(self.groupBox_2) 
     self.datavalue1.setGeometry(QtCore.QRect(20, 80, 101, 27)) 
     self.datavalue1.setObjectName(_fromUtf8("datavalue1")) 
     self.datavalue2 = QtGui.QLineEdit(self.groupBox_2) 
     self.datavalue2.setGeometry(QtCore.QRect(130, 80, 113, 27)) 
     self.datavalue2.setObjectName(_fromUtf8("datavalue2")) 
     self.datavalue3 = QtGui.QLineEdit(self.groupBox_2) 
     self.datavalue3.setGeometry(QtCore.QRect(250, 80, 113, 27)) 
     self.datavalue3.setObjectName(_fromUtf8("datavalue3")) 
     self.groupBox_4 = QtGui.QGroupBox(self.centralwidget) 
     self.groupBox_4.setGeometry(QtCore.QRect(670, 50, 151, 111)) 
     self.groupBox_4.setTitle(QtGui.QApplication.translate("MainWindow", "password:", None, QtGui.QApplication.UnicodeUTF8)) 
     self.groupBox_4.setObjectName(_fromUtf8("groupBox_4")) 
     self.passname = QtGui.QLineEdit(self.groupBox_4) 
     self.passname.setGeometry(QtCore.QRect(10, 30, 113, 27)) 
     self.passname.setObjectName(_fromUtf8("passname")) 
     self.passvalue = QtGui.QLineEdit(self.groupBox_4) 
     self.passvalue.setGeometry(QtCore.QRect(10, 80, 113, 27)) 
     self.passvalue.setObjectName(_fromUtf8("passvalue")) 
     self.passwordcheck = QtGui.QCheckBox(self.centralwidget) 
     self.passwordcheck.setGeometry(QtCore.QRect(670, 180, 97, 22)) 
     self.passwordcheck.setText(QtGui.QApplication.translate("MainWindow", "password", None, QtGui.QApplication.UnicodeUTF8)) 
     self.passwordcheck.setChecked(True) 
     self.passwordcheck.setObjectName(_fromUtf8("passwordcheck")) 
     self.groupBox_5 = QtGui.QGroupBox(self.centralwidget) 
     self.groupBox_5.setGeometry(QtCore.QRect(29, 169, 441, 81)) 
     self.groupBox_5.setTitle(QtGui.QApplication.translate("MainWindow", "proxy:", None, QtGui.QApplication.UnicodeUTF8)) 
     self.groupBox_5.setObjectName(_fromUtf8("groupBox_5")) 
     self.proxyhost = QtGui.QLineEdit(self.groupBox_5) 
     self.proxyhost.setGeometry(QtCore.QRect(20, 30, 113, 27)) 
     self.proxyhost.setObjectName(_fromUtf8("proxyhost")) 
     self.proxyport = QtGui.QLineEdit(self.groupBox_5) 
     self.proxyport.setGeometry(QtCore.QRect(140, 30, 51, 27)) 
     self.proxyport.setInputMethodHints(QtCore.Qt.ImhDigitsOnly|QtCore.Qt.ImhPreferNumbers) 
     self.proxyport.setObjectName(_fromUtf8("proxyport")) 
     self.proxyuser = QtGui.QLineEdit(self.groupBox_5) 
     self.proxyuser.setGeometry(QtCore.QRect(200, 30, 113, 27)) 
     self.proxyuser.setObjectName(_fromUtf8("proxyuser")) 
     self.proxypass = QtGui.QLineEdit(self.groupBox_5) 
     self.proxypass.setGeometry(QtCore.QRect(320, 30, 113, 27)) 
     self.proxypass.setObjectName(_fromUtf8("proxypass")) 
     self.label_4 = QtGui.QLabel(self.groupBox_5) 
     self.label_4.setGeometry(QtCore.QRect(100, 10, 67, 17)) 
     self.label_4.setText(QtGui.QApplication.translate("MainWindow", "host", None, QtGui.QApplication.UnicodeUTF8)) 
     self.label_4.setObjectName(_fromUtf8("label_4")) 
     self.label_5 = QtGui.QLabel(self.groupBox_5) 
     self.label_5.setGeometry(QtCore.QRect(150, 10, 67, 17)) 
     self.label_5.setText(QtGui.QApplication.translate("MainWindow", "port", None, QtGui.QApplication.UnicodeUTF8)) 
     self.label_5.setObjectName(_fromUtf8("label_5")) 
     self.label_6 = QtGui.QLabel(self.groupBox_5) 
     self.label_6.setGeometry(QtCore.QRect(200, 10, 67, 17)) 
     self.label_6.setText(QtGui.QApplication.translate("MainWindow", "username", None, QtGui.QApplication.UnicodeUTF8)) 
     self.label_6.setObjectName(_fromUtf8("label_6")) 
     self.label_7 = QtGui.QLabel(self.groupBox_5) 
     self.label_7.setGeometry(QtCore.QRect(320, 10, 67, 17)) 
     self.label_7.setText(QtGui.QApplication.translate("MainWindow", "password", None, QtGui.QApplication.UnicodeUTF8)) 
     self.label_7.setObjectName(_fromUtf8("label_7")) 
     self.groupBox_6 = QtGui.QGroupBox(self.centralwidget) 
     self.groupBox_6.setGeometry(QtCore.QRect(30, 260, 531, 91)) 
     self.groupBox_6.setTitle(QtGui.QApplication.translate("MainWindow", "cookies:", None, QtGui.QApplication.UnicodeUTF8)) 
     self.groupBox_6.setObjectName(_fromUtf8("groupBox_6")) 
     self.cookiename1 = QtGui.QLineEdit(self.groupBox_6) 
     self.cookiename1.setGeometry(QtCore.QRect(10, 20, 113, 27)) 
     self.cookiename1.setObjectName(_fromUtf8("cookiename1")) 
     self.cookiename2 = QtGui.QLineEdit(self.groupBox_6) 
     self.cookiename2.setGeometry(QtCore.QRect(140, 20, 113, 27)) 
     self.cookiename2.setObjectName(_fromUtf8("cookename2")) 
     self.cookiename3 = QtGui.QLineEdit(self.groupBox_6) 
     self.cookiename3.setGeometry(QtCore.QRect(270, 20, 113, 27)) 
     self.cookiename3.setObjectName(_fromUtf8("cookiename3")) 
     self.cookiename4 = QtGui.QLineEdit(self.groupBox_6) 
     self.cookiename4.setGeometry(QtCore.QRect(390, 20, 113, 27)) 
     self.cookiename4.setObjectName(_fromUtf8("cookiename4")) 
     self.cookievalue1 = QtGui.QLineEdit(self.groupBox_6) 
     self.cookievalue1.setGeometry(QtCore.QRect(10, 50, 113, 27)) 
     self.cookievalue1.setObjectName(_fromUtf8("cookievalue1")) 
     self.cookievalue2 = QtGui.QLineEdit(self.groupBox_6) 
     self.cookievalue2.setGeometry(QtCore.QRect(140, 50, 113, 27)) 
     self.cookievalue2.setObjectName(_fromUtf8("cookievalue2")) 
     self.cookievalue3 = QtGui.QLineEdit(self.groupBox_6) 
     self.cookievalue3.setGeometry(QtCore.QRect(270, 50, 113, 27)) 
     self.cookievalue3.setObjectName(_fromUtf8("cookievalue3")) 
     self.cookievalue4 = QtGui.QLineEdit(self.groupBox_6) 
     self.cookievalue4.setGeometry(QtCore.QRect(390, 50, 113, 27)) 
     self.cookievalue4.setObjectName(_fromUtf8("cookievalue4")) 
     self.groupBox_7 = QtGui.QGroupBox(self.centralwidget) 
     self.groupBox_7.setGeometry(QtCore.QRect(570, 260, 251, 80)) 
     self.groupBox_7.setTitle(QtGui.QApplication.translate("MainWindow", "useragents:", None, QtGui.QApplication.UnicodeUTF8)) 
     self.groupBox_7.setObjectName(_fromUtf8("groupBox_7")) 
     self.useragent = QtGui.QTextEdit(self.groupBox_7) 
     self.useragent.setGeometry(QtCore.QRect(10, 20, 211, 51)) 
     self.useragent.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOn) 
     self.useragent.setObjectName(_fromUtf8("useragent")) 
     self.start = QtGui.QPushButton(self.centralwidget) 
     self.start.setGeometry(QtCore.QRect(750, 20, 71, 27)) 
     self.start.setText(QtGui.QApplication.translate("MainWindow", "start", None, QtGui.QApplication.UnicodeUTF8)) 
     self.start.setObjectName(_fromUtf8("start")) 
     self.label_3 = QtGui.QLabel(self.centralwidget) 
     self.label_3.setGeometry(QtCore.QRect(30, 20, 67, 17)) 
     self.label_3.setText(QtGui.QApplication.translate("MainWindow", "url :", None, QtGui.QApplication.UnicodeUTF8)) 
     self.label_3.setObjectName(_fromUtf8("label_3")) 
     MainWindow.setCentralWidget(self.centralwidget) 
     QtCore.QObject.connect(self.start, QtCore.SIGNAL(_fromUtf8("clicked(bool)")), myfun.main) 
     QtCore.QObject.connect(self.passwordcheck, QtCore.SIGNAL(_fromUtf8("clicked(bool)")), self.groupBox_4.setEnabled) 
     QtCore.QMetaObject.connectSlotsByName(MainWindow) 


def __del__(): 
    myfun.killer() 
    os.abort() 
    sys.exit() 

app = QtGui.QApplication(sys.argv) 
MainWindow = QtGui.QMainWindow() 
ui = Ui_MainWindow() 
ui.setupUi(MainWindow) 
myfun.log("\n\n--------------------------------------------------new session-------------------------------------\n\n") 
MainWindow.show() 
sys.exit(app.exec_()) 
+2

코드를 400 줄의 blob로 게시하는 대신 실제로 오류가있는 곳으로 코드 범위를 좁힐 수 있습니까? – Andy

+1

이 코드는 1.5 살짜리 딸이 지금 울음을 터 뜨리고 있습니다. -/ – jdi

+0

: 죄송 합니다만 오류 행의 위치를 ​​모르겠습니다. – memomk

답변

2

작동합니다 잘못된 라인이다 크래시를 유발하는 코드 :

class flooderthread(QtCore.QThread): 
    ... 
    def run(self): 
     connecter() # this is the culprit 

fun.main()에서 모든 신호/슬롯 연결을 설정하려면 connecter()을 한 번 호출해야합니다. 이 호출은 주 스레드에서 발생합니다. 그런 다음 각 스레드는 해당 메서드를 호출하여 스레드간에 객체에 대한 중복 연결을 만들려고합니다. 실제 충돌은 신호 발사의 결과이기 때문에이 함수보다 훨씬 더 깊게 발생할 수 있습니다. 그러나 나는 더 깊어지기 위해 코드 주위를 뛰어 다니기가 너무 어렵습니다. 대부분의 경우 스레드가 GUI 요소를 직접 수정하지 않아야합니다. 난 그냥이 스크립트를 수행하기가 매우 어려운 점을 지적하고자,이 제외

def main(self): 
    connecter() 
    ... 
    time.sleep(3) 
    gui() 
    f5.start() 
    gui() 
    self.sleep(3) # should be time.sleep(3) 
    gui() 
    ... 

: 당신이 고정 된 것을 일단

, 당신은 그것을 충돌 할 것 하나 다른 오타가 있습니다. 어디에서나 전역 변수를 사용하므로 특정 변수와 함수 호출이 정의 된 위치를 알기가 어렵습니다. 무리를 뒤져서 쫓아 내야합니다. 눈덩이처럼 계속하기 전에이 작업을 중단하고 재구성 할 수 있습니다.
매우은 다음과 같은 책을 가져 오는 것이 좋습니다. http://www.qtrac.eu/pyqtbook.html
중점적으로 고려해야 할 것은 적절한 수업 구성입니다. 현재 클래스 구조는 많은 검토가 필요하므로 클래스를 작성하는 방법을 먼저 배우기 위해 좋은 파이썬 책을 선택하는 것이 좋습니다. 나는 당신이 단지 배우는 것임을 깨달았습니다. 그래서이 조언이 당신을 올바른 방향으로 인도하는 데 도움이되기를 바랍니다.

+0

고맙습니다. 내가 아직 코드에서 끝내지 않았다고 말했다 ... 그리고 책을 주셔서 감사합니다 나는이 같은 것을 찾고 있었다 :) – memomk

관련 문제