How to Fix the pyqt signal error in virtuval keyboard using with pyface

Multi tool use
Multi tool use











up vote
0
down vote

favorite












Here is my code,i want to create a virtuval touch keyboard using with pyqt4.But i am getting error can anyone please help me how to fix this error.my error signal_evoke_kb = QtCore.pyqtSignal()
AttributeError: 'module' object has no attribute 'pyqtSignal' .
Thank you in advance



import os

from pyface.qt import QtGui, QtCore
import sys



class MainWindow(QtGui.QMainWindow):

def __init__(self):
super(MainWindow, self).__init__()
self.central_widget = QtGui.QWidget()
self.cw_layout = QtGui.QHBoxLayout()
self.central_widget.setLayout(self.cw_layout)
self.setCentralWidget(self.central_widget)

self.line = QtGui.QLineEdit()
self.kb = KeyBoard()

self.cw_layout.addWidget(self.line)

self.create_connections()

def create_connections(self):
self.line.signal_evoke_kb.connect(self.show_kb)

def show_kb(self):
if self.kb.isHidden():
self.kb.show()
else:
self.kb.hide()


class LineEdit(QtGui.QLineEdit):

signal_evoke_kb = QtCore.pyqtSignal()

def __init__(self):
super(LineEdit, self).__init__()

def mousePressEvent(self, QMouseEvent):
super(LineEdit, self).mousePressEvent(QMouseEvent)
self.signal_evoke_kb.emit()

class KeyBoard(QtGui.QWidget):

def __init__(self):
super(KeyBoard, self).__init__()
self.layout = QtGui.QHBoxLayout()
for key in ['q','w','e','r','t','y']:
self.layout.addWidget(QtGui.QPushButton(key))
self.setLayout(self.layout)


if __name__ == "__main__":
app = QtGui.QApplication(sys.argv)
mw = MainWindow()
mw.show()
sys.exit(app.exec_())









share|improve this question


























    up vote
    0
    down vote

    favorite












    Here is my code,i want to create a virtuval touch keyboard using with pyqt4.But i am getting error can anyone please help me how to fix this error.my error signal_evoke_kb = QtCore.pyqtSignal()
    AttributeError: 'module' object has no attribute 'pyqtSignal' .
    Thank you in advance



    import os

    from pyface.qt import QtGui, QtCore
    import sys



    class MainWindow(QtGui.QMainWindow):

    def __init__(self):
    super(MainWindow, self).__init__()
    self.central_widget = QtGui.QWidget()
    self.cw_layout = QtGui.QHBoxLayout()
    self.central_widget.setLayout(self.cw_layout)
    self.setCentralWidget(self.central_widget)

    self.line = QtGui.QLineEdit()
    self.kb = KeyBoard()

    self.cw_layout.addWidget(self.line)

    self.create_connections()

    def create_connections(self):
    self.line.signal_evoke_kb.connect(self.show_kb)

    def show_kb(self):
    if self.kb.isHidden():
    self.kb.show()
    else:
    self.kb.hide()


    class LineEdit(QtGui.QLineEdit):

    signal_evoke_kb = QtCore.pyqtSignal()

    def __init__(self):
    super(LineEdit, self).__init__()

    def mousePressEvent(self, QMouseEvent):
    super(LineEdit, self).mousePressEvent(QMouseEvent)
    self.signal_evoke_kb.emit()

    class KeyBoard(QtGui.QWidget):

    def __init__(self):
    super(KeyBoard, self).__init__()
    self.layout = QtGui.QHBoxLayout()
    for key in ['q','w','e','r','t','y']:
    self.layout.addWidget(QtGui.QPushButton(key))
    self.setLayout(self.layout)


    if __name__ == "__main__":
    app = QtGui.QApplication(sys.argv)
    mw = MainWindow()
    mw.show()
    sys.exit(app.exec_())









    share|improve this question
























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      Here is my code,i want to create a virtuval touch keyboard using with pyqt4.But i am getting error can anyone please help me how to fix this error.my error signal_evoke_kb = QtCore.pyqtSignal()
      AttributeError: 'module' object has no attribute 'pyqtSignal' .
      Thank you in advance



      import os

      from pyface.qt import QtGui, QtCore
      import sys



      class MainWindow(QtGui.QMainWindow):

      def __init__(self):
      super(MainWindow, self).__init__()
      self.central_widget = QtGui.QWidget()
      self.cw_layout = QtGui.QHBoxLayout()
      self.central_widget.setLayout(self.cw_layout)
      self.setCentralWidget(self.central_widget)

      self.line = QtGui.QLineEdit()
      self.kb = KeyBoard()

      self.cw_layout.addWidget(self.line)

      self.create_connections()

      def create_connections(self):
      self.line.signal_evoke_kb.connect(self.show_kb)

      def show_kb(self):
      if self.kb.isHidden():
      self.kb.show()
      else:
      self.kb.hide()


      class LineEdit(QtGui.QLineEdit):

      signal_evoke_kb = QtCore.pyqtSignal()

      def __init__(self):
      super(LineEdit, self).__init__()

      def mousePressEvent(self, QMouseEvent):
      super(LineEdit, self).mousePressEvent(QMouseEvent)
      self.signal_evoke_kb.emit()

      class KeyBoard(QtGui.QWidget):

      def __init__(self):
      super(KeyBoard, self).__init__()
      self.layout = QtGui.QHBoxLayout()
      for key in ['q','w','e','r','t','y']:
      self.layout.addWidget(QtGui.QPushButton(key))
      self.setLayout(self.layout)


      if __name__ == "__main__":
      app = QtGui.QApplication(sys.argv)
      mw = MainWindow()
      mw.show()
      sys.exit(app.exec_())









      share|improve this question













      Here is my code,i want to create a virtuval touch keyboard using with pyqt4.But i am getting error can anyone please help me how to fix this error.my error signal_evoke_kb = QtCore.pyqtSignal()
      AttributeError: 'module' object has no attribute 'pyqtSignal' .
      Thank you in advance



      import os

      from pyface.qt import QtGui, QtCore
      import sys



      class MainWindow(QtGui.QMainWindow):

      def __init__(self):
      super(MainWindow, self).__init__()
      self.central_widget = QtGui.QWidget()
      self.cw_layout = QtGui.QHBoxLayout()
      self.central_widget.setLayout(self.cw_layout)
      self.setCentralWidget(self.central_widget)

      self.line = QtGui.QLineEdit()
      self.kb = KeyBoard()

      self.cw_layout.addWidget(self.line)

      self.create_connections()

      def create_connections(self):
      self.line.signal_evoke_kb.connect(self.show_kb)

      def show_kb(self):
      if self.kb.isHidden():
      self.kb.show()
      else:
      self.kb.hide()


      class LineEdit(QtGui.QLineEdit):

      signal_evoke_kb = QtCore.pyqtSignal()

      def __init__(self):
      super(LineEdit, self).__init__()

      def mousePressEvent(self, QMouseEvent):
      super(LineEdit, self).mousePressEvent(QMouseEvent)
      self.signal_evoke_kb.emit()

      class KeyBoard(QtGui.QWidget):

      def __init__(self):
      super(KeyBoard, self).__init__()
      self.layout = QtGui.QHBoxLayout()
      for key in ['q','w','e','r','t','y']:
      self.layout.addWidget(QtGui.QPushButton(key))
      self.setLayout(self.layout)


      if __name__ == "__main__":
      app = QtGui.QApplication(sys.argv)
      mw = MainWindow()
      mw.show()
      sys.exit(app.exec_())






      python pyqt pyqt4 pyface






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked yesterday









      raghava

      417




      417
























          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote













          In pyface you must use Signal instead of pyqtSignal since pyface renames it to have compatibility with other backends such as PySide and PySide2.



          import sys
          from pyface.qt import QtGui, QtCore

          class MainWindow(QtGui.QMainWindow):
          def __init__(self):
          super(MainWindow, self).__init__()
          self.central_widget = QtGui.QWidget()
          self.cw_layout = QtGui.QHBoxLayout()
          self.central_widget.setLayout(self.cw_layout)
          self.setCentralWidget(self.central_widget)

          self.line = LineEdit()
          self.kb = KeyBoard()

          self.cw_layout.addWidget(self.line)

          self.create_connections()

          def create_connections(self):
          self.line.signal_evoke_kb.connect(self.show_kb)

          def show_kb(self):
          if self.kb.isHidden():
          self.kb.show()
          else:
          self.kb.hide()

          class LineEdit(QtGui.QLineEdit):
          signal_evoke_kb = QtCore.Signal()

          def mousePressEvent(self, QMouseEvent):
          super(LineEdit, self).mousePressEvent(QMouseEvent)
          self.signal_evoke_kb.emit()

          class KeyBoard(QtGui.QWidget):
          def __init__(self):
          super(KeyBoard, self).__init__()
          self.layout = QtGui.QHBoxLayout()
          for key in ['q','w','e','r','t','y']:
          self.layout.addWidget(QtGui.QPushButton(key))
          self.setLayout(self.layout)


          if __name__ == "__main__":
          app = QtGui.QApplication(sys.argv)
          mw = MainWindow()
          mw.show()
          sys.exit(app.exec_())





          share|improve this answer





















          • thank you.but why my keys are not entered in line edit
            – raghava
            14 hours ago










          • @raghava What keys do you mean? Your problem is the signal, not the keyboard, that's what your question indicates
            – eyllanesc
            14 hours ago










          • actually this is sample code by using this code i want to display the virtual keyboard,in my project when i have to type text in line edit then i want to display the virtual keyboard so for that i am trying sir
            – raghava
            14 hours ago










          • i tried so many examples in google but i didn't get properly if you know please send me the related links
            – raghava
            14 hours ago










          • @raghava ok, I understand you but avoid asking the same question in several posts, that is considered noise, instead of helping you cause discomfort, in a few hours I will update my answer
            – eyllanesc
            14 hours ago











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














           

          draft saved


          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53183870%2fhow-to-fix-the-pyqt-signal-error-in-virtuval-keyboard-using-with-pyface%23new-answer', 'question_page');
          }
          );

          Post as a guest
































          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          0
          down vote













          In pyface you must use Signal instead of pyqtSignal since pyface renames it to have compatibility with other backends such as PySide and PySide2.



          import sys
          from pyface.qt import QtGui, QtCore

          class MainWindow(QtGui.QMainWindow):
          def __init__(self):
          super(MainWindow, self).__init__()
          self.central_widget = QtGui.QWidget()
          self.cw_layout = QtGui.QHBoxLayout()
          self.central_widget.setLayout(self.cw_layout)
          self.setCentralWidget(self.central_widget)

          self.line = LineEdit()
          self.kb = KeyBoard()

          self.cw_layout.addWidget(self.line)

          self.create_connections()

          def create_connections(self):
          self.line.signal_evoke_kb.connect(self.show_kb)

          def show_kb(self):
          if self.kb.isHidden():
          self.kb.show()
          else:
          self.kb.hide()

          class LineEdit(QtGui.QLineEdit):
          signal_evoke_kb = QtCore.Signal()

          def mousePressEvent(self, QMouseEvent):
          super(LineEdit, self).mousePressEvent(QMouseEvent)
          self.signal_evoke_kb.emit()

          class KeyBoard(QtGui.QWidget):
          def __init__(self):
          super(KeyBoard, self).__init__()
          self.layout = QtGui.QHBoxLayout()
          for key in ['q','w','e','r','t','y']:
          self.layout.addWidget(QtGui.QPushButton(key))
          self.setLayout(self.layout)


          if __name__ == "__main__":
          app = QtGui.QApplication(sys.argv)
          mw = MainWindow()
          mw.show()
          sys.exit(app.exec_())





          share|improve this answer





















          • thank you.but why my keys are not entered in line edit
            – raghava
            14 hours ago










          • @raghava What keys do you mean? Your problem is the signal, not the keyboard, that's what your question indicates
            – eyllanesc
            14 hours ago










          • actually this is sample code by using this code i want to display the virtual keyboard,in my project when i have to type text in line edit then i want to display the virtual keyboard so for that i am trying sir
            – raghava
            14 hours ago










          • i tried so many examples in google but i didn't get properly if you know please send me the related links
            – raghava
            14 hours ago










          • @raghava ok, I understand you but avoid asking the same question in several posts, that is considered noise, instead of helping you cause discomfort, in a few hours I will update my answer
            – eyllanesc
            14 hours ago















          up vote
          0
          down vote













          In pyface you must use Signal instead of pyqtSignal since pyface renames it to have compatibility with other backends such as PySide and PySide2.



          import sys
          from pyface.qt import QtGui, QtCore

          class MainWindow(QtGui.QMainWindow):
          def __init__(self):
          super(MainWindow, self).__init__()
          self.central_widget = QtGui.QWidget()
          self.cw_layout = QtGui.QHBoxLayout()
          self.central_widget.setLayout(self.cw_layout)
          self.setCentralWidget(self.central_widget)

          self.line = LineEdit()
          self.kb = KeyBoard()

          self.cw_layout.addWidget(self.line)

          self.create_connections()

          def create_connections(self):
          self.line.signal_evoke_kb.connect(self.show_kb)

          def show_kb(self):
          if self.kb.isHidden():
          self.kb.show()
          else:
          self.kb.hide()

          class LineEdit(QtGui.QLineEdit):
          signal_evoke_kb = QtCore.Signal()

          def mousePressEvent(self, QMouseEvent):
          super(LineEdit, self).mousePressEvent(QMouseEvent)
          self.signal_evoke_kb.emit()

          class KeyBoard(QtGui.QWidget):
          def __init__(self):
          super(KeyBoard, self).__init__()
          self.layout = QtGui.QHBoxLayout()
          for key in ['q','w','e','r','t','y']:
          self.layout.addWidget(QtGui.QPushButton(key))
          self.setLayout(self.layout)


          if __name__ == "__main__":
          app = QtGui.QApplication(sys.argv)
          mw = MainWindow()
          mw.show()
          sys.exit(app.exec_())





          share|improve this answer





















          • thank you.but why my keys are not entered in line edit
            – raghava
            14 hours ago










          • @raghava What keys do you mean? Your problem is the signal, not the keyboard, that's what your question indicates
            – eyllanesc
            14 hours ago










          • actually this is sample code by using this code i want to display the virtual keyboard,in my project when i have to type text in line edit then i want to display the virtual keyboard so for that i am trying sir
            – raghava
            14 hours ago










          • i tried so many examples in google but i didn't get properly if you know please send me the related links
            – raghava
            14 hours ago










          • @raghava ok, I understand you but avoid asking the same question in several posts, that is considered noise, instead of helping you cause discomfort, in a few hours I will update my answer
            – eyllanesc
            14 hours ago













          up vote
          0
          down vote










          up vote
          0
          down vote









          In pyface you must use Signal instead of pyqtSignal since pyface renames it to have compatibility with other backends such as PySide and PySide2.



          import sys
          from pyface.qt import QtGui, QtCore

          class MainWindow(QtGui.QMainWindow):
          def __init__(self):
          super(MainWindow, self).__init__()
          self.central_widget = QtGui.QWidget()
          self.cw_layout = QtGui.QHBoxLayout()
          self.central_widget.setLayout(self.cw_layout)
          self.setCentralWidget(self.central_widget)

          self.line = LineEdit()
          self.kb = KeyBoard()

          self.cw_layout.addWidget(self.line)

          self.create_connections()

          def create_connections(self):
          self.line.signal_evoke_kb.connect(self.show_kb)

          def show_kb(self):
          if self.kb.isHidden():
          self.kb.show()
          else:
          self.kb.hide()

          class LineEdit(QtGui.QLineEdit):
          signal_evoke_kb = QtCore.Signal()

          def mousePressEvent(self, QMouseEvent):
          super(LineEdit, self).mousePressEvent(QMouseEvent)
          self.signal_evoke_kb.emit()

          class KeyBoard(QtGui.QWidget):
          def __init__(self):
          super(KeyBoard, self).__init__()
          self.layout = QtGui.QHBoxLayout()
          for key in ['q','w','e','r','t','y']:
          self.layout.addWidget(QtGui.QPushButton(key))
          self.setLayout(self.layout)


          if __name__ == "__main__":
          app = QtGui.QApplication(sys.argv)
          mw = MainWindow()
          mw.show()
          sys.exit(app.exec_())





          share|improve this answer












          In pyface you must use Signal instead of pyqtSignal since pyface renames it to have compatibility with other backends such as PySide and PySide2.



          import sys
          from pyface.qt import QtGui, QtCore

          class MainWindow(QtGui.QMainWindow):
          def __init__(self):
          super(MainWindow, self).__init__()
          self.central_widget = QtGui.QWidget()
          self.cw_layout = QtGui.QHBoxLayout()
          self.central_widget.setLayout(self.cw_layout)
          self.setCentralWidget(self.central_widget)

          self.line = LineEdit()
          self.kb = KeyBoard()

          self.cw_layout.addWidget(self.line)

          self.create_connections()

          def create_connections(self):
          self.line.signal_evoke_kb.connect(self.show_kb)

          def show_kb(self):
          if self.kb.isHidden():
          self.kb.show()
          else:
          self.kb.hide()

          class LineEdit(QtGui.QLineEdit):
          signal_evoke_kb = QtCore.Signal()

          def mousePressEvent(self, QMouseEvent):
          super(LineEdit, self).mousePressEvent(QMouseEvent)
          self.signal_evoke_kb.emit()

          class KeyBoard(QtGui.QWidget):
          def __init__(self):
          super(KeyBoard, self).__init__()
          self.layout = QtGui.QHBoxLayout()
          for key in ['q','w','e','r','t','y']:
          self.layout.addWidget(QtGui.QPushButton(key))
          self.setLayout(self.layout)


          if __name__ == "__main__":
          app = QtGui.QApplication(sys.argv)
          mw = MainWindow()
          mw.show()
          sys.exit(app.exec_())






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered 21 hours ago









          eyllanesc

          66k82952




          66k82952












          • thank you.but why my keys are not entered in line edit
            – raghava
            14 hours ago










          • @raghava What keys do you mean? Your problem is the signal, not the keyboard, that's what your question indicates
            – eyllanesc
            14 hours ago










          • actually this is sample code by using this code i want to display the virtual keyboard,in my project when i have to type text in line edit then i want to display the virtual keyboard so for that i am trying sir
            – raghava
            14 hours ago










          • i tried so many examples in google but i didn't get properly if you know please send me the related links
            – raghava
            14 hours ago










          • @raghava ok, I understand you but avoid asking the same question in several posts, that is considered noise, instead of helping you cause discomfort, in a few hours I will update my answer
            – eyllanesc
            14 hours ago


















          • thank you.but why my keys are not entered in line edit
            – raghava
            14 hours ago










          • @raghava What keys do you mean? Your problem is the signal, not the keyboard, that's what your question indicates
            – eyllanesc
            14 hours ago










          • actually this is sample code by using this code i want to display the virtual keyboard,in my project when i have to type text in line edit then i want to display the virtual keyboard so for that i am trying sir
            – raghava
            14 hours ago










          • i tried so many examples in google but i didn't get properly if you know please send me the related links
            – raghava
            14 hours ago










          • @raghava ok, I understand you but avoid asking the same question in several posts, that is considered noise, instead of helping you cause discomfort, in a few hours I will update my answer
            – eyllanesc
            14 hours ago
















          thank you.but why my keys are not entered in line edit
          – raghava
          14 hours ago




          thank you.but why my keys are not entered in line edit
          – raghava
          14 hours ago












          @raghava What keys do you mean? Your problem is the signal, not the keyboard, that's what your question indicates
          – eyllanesc
          14 hours ago




          @raghava What keys do you mean? Your problem is the signal, not the keyboard, that's what your question indicates
          – eyllanesc
          14 hours ago












          actually this is sample code by using this code i want to display the virtual keyboard,in my project when i have to type text in line edit then i want to display the virtual keyboard so for that i am trying sir
          – raghava
          14 hours ago




          actually this is sample code by using this code i want to display the virtual keyboard,in my project when i have to type text in line edit then i want to display the virtual keyboard so for that i am trying sir
          – raghava
          14 hours ago












          i tried so many examples in google but i didn't get properly if you know please send me the related links
          – raghava
          14 hours ago




          i tried so many examples in google but i didn't get properly if you know please send me the related links
          – raghava
          14 hours ago












          @raghava ok, I understand you but avoid asking the same question in several posts, that is considered noise, instead of helping you cause discomfort, in a few hours I will update my answer
          – eyllanesc
          14 hours ago




          @raghava ok, I understand you but avoid asking the same question in several posts, that is considered noise, instead of helping you cause discomfort, in a few hours I will update my answer
          – eyllanesc
          14 hours ago


















           

          draft saved


          draft discarded



















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53183870%2fhow-to-fix-the-pyqt-signal-error-in-virtuval-keyboard-using-with-pyface%23new-answer', 'question_page');
          }
          );

          Post as a guest




















































































          YO 4MG,DnsTVitojpqlUaE3utsTTTCOxSYTeGURAOVzL5t,Dw,zsmCs,Lon6
          pMJ,skAWRa ncDnD4gTEctpjpNaXbyEoWYlfqfRzA2TR,OGal5KeM

          Popular posts from this blog

          横浜市

          Rostock

          Europa