{"action":"created","issue":{"url":"https://api.github.com/repos/shantnu/PyQt_first/issues/1","repository_url":"https://api.github.com/repos/shantnu/PyQt_first","labels_url":"https://api.github.com/repos/shantnu/PyQt_first/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/shantnu/PyQt_first/issues/1/comments","events_url":"https://api.github.com/repos/shantnu/PyQt_first/issues/1/events","html_url":"https://github.com/shantnu/PyQt_first/issues/1","id":158289394,"number":1,"title":"About TextBrowser","user":{"login":"originals-tz","id":15152973,"avatar_url":"https://avatars.githubusercontent.com/u/15152973?v=3","gravatar_id":"","url":"https://api.github.com/users/originals-tz","html_url":"https://github.com/originals-tz","followers_url":"https://api.github.com/users/originals-tz/followers","following_url":"https://api.github.com/users/originals-tz/following{/other_user}","gists_url":"https://api.github.com/users/originals-tz/gists{/gist_id}","starred_url":"https://api.github.com/users/originals-tz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/originals-tz/subscriptions","organizations_url":"https://api.github.com/users/originals-tz/orgs","repos_url":"https://api.github.com/users/originals-tz/repos","events_url":"https://api.github.com/users/originals-tz/events{/privacy}","received_events_url":"https://api.github.com/users/originals-tz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-06-03T04:34:12Z","updated_at":"2016-06-03T09:05:22Z","closed_at":null,"body":"excuse me\r\ni'm so excited to read your article about the PyQt4\r\nbut, when i use the template to build my app\r\ni get into a trouble\r\n\r\nwhen i use TextBrowser widget, it will report a TypeError\r\n```\r\nTraceback (most recent call last):\r\n  File \"template.py\", line 21, in <module>\r\n    window.show()\r\nTypeError: 'QTextBrowser' object is not callable\r\n\r\n```\r\n\r\n```\r\nimport sys\r\nfrom PyQt4 import QtCore, QtGui, uic\r\n#add the path of ui file\r\nqtCreatorFile = \"show.ui\" \r\n\r\nUi_MainWindow, QtBaseClass = uic.loadUiType(qtCreatorFile)\r\n\r\nclass MyApp(QtGui.QMainWindow, Ui_MainWindow):\r\n    def __init__(self):\r\n        QtGui.QMainWindow.__init__(self)\r\n        Ui_MainWindow.__init__(self)\r\n        self.setupUi(self)\r\n        self.send.clicked.connect(self.Send) # i add a push button\r\n\r\n    def Send(self):\r\n    \tself.show.append(str(self.message.toPainText())) #it will report a TypeError\r\n        \r\nif __name__ == \"__main__\":\r\n    app = QtGui.QApplication(sys.argv)\r\n    window = MyApp()\r\n    window.show()\r\n    sys.exit(app.exec_())\r\n```\r\n\r\n```\r\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<ui version=\"4.0\">\r\n <class>MainWindow</class>\r\n <widget class=\"QMainWindow\" name=\"MainWindow\">\r\n  <property name=\"geometry\">\r\n   <rect>\r\n    <x>0</x>\r\n    <y>0</y>\r\n    <width>800</width>\r\n    <height>600</height>\r\n   </rect>\r\n  </property>\r\n  <property name=\"windowTitle\">\r\n   <string>MainWindow</string>\r\n  </property>\r\n  <widget class=\"QWidget\" name=\"centralwidget\">\r\n   <widget class=\"QTextBrowser\" name=\"show\">\r\n    <property name=\"geometry\">\r\n     <rect>\r\n      <x>160</x>\r\n      <y>70</y>\r\n      <width>461</width>\r\n      <height>241</height>\r\n     </rect>\r\n    </property>\r\n   </widget>\r\n   <widget class=\"QTextEdit\" name=\"message\">\r\n    <property name=\"geometry\">\r\n     <rect>\r\n      <x>230</x>\r\n      <y>330</y>\r\n      <width>351</width>\r\n      <height>81</height>\r\n     </rect>\r\n    </property>\r\n   </widget>\r\n   <widget class=\"QPushButton\" name=\"send\">\r\n    <property name=\"geometry\">\r\n     <rect>\r\n      <x>380</x>\r\n      <y>430</y>\r\n      <width>88</width>\r\n      <height>29</height>\r\n     </rect>\r\n    </property>\r\n    <property name=\"text\">\r\n     <string>send</string>\r\n    </property>\r\n   </widget>\r\n  </widget>\r\n  <widget class=\"QMenuBar\" name=\"menubar\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>0</x>\r\n     <y>0</y>\r\n     <width>800</width>\r\n     <height>24</height>\r\n    </rect>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QStatusBar\" name=\"statusbar\"/>\r\n </widget>\r\n <resources/>\r\n <connections/>\r\n</ui>\r\n\r\n```\r\nhow to deal it?"},"comment":{"url":"https://api.github.com/repos/shantnu/PyQt_first/issues/comments/223528577","html_url":"https://github.com/shantnu/PyQt_first/issues/1#issuecomment-223528577","issue_url":"https://api.github.com/repos/shantnu/PyQt_first/issues/1","id":223528577,"user":{"login":"originals-tz","id":15152973,"avatar_url":"https://avatars.githubusercontent.com/u/15152973?v=3","gravatar_id":"","url":"https://api.github.com/users/originals-tz","html_url":"https://github.com/originals-tz","followers_url":"https://api.github.com/users/originals-tz/followers","following_url":"https://api.github.com/users/originals-tz/following{/other_user}","gists_url":"https://api.github.com/users/originals-tz/gists{/gist_id}","starred_url":"https://api.github.com/users/originals-tz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/originals-tz/subscriptions","organizations_url":"https://api.github.com/users/originals-tz/orgs","repos_url":"https://api.github.com/users/originals-tz/repos","events_url":"https://api.github.com/users/originals-tz/events{/privacy}","received_events_url":"https://api.github.com/users/originals-tz/received_events","type":"User","site_admin":false},"created_at":"2016-06-03T09:05:21Z","updated_at":"2016-06-03T09:05:21Z","body":"oh，thank you\r\nnow i feel my question is so stupid  :-P"}}
{"actor":{"display_login":"originals-tz"}}