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

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_())
python pyqt pyqt4 pyface
add a comment |
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_())
python pyqt pyqt4 pyface
add a comment |
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_())
python pyqt pyqt4 pyface
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
python pyqt pyqt4 pyface
asked yesterday
raghava
417
417
add a comment |
add a comment |
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_())
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
|
show 2 more comments
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_())
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
|
show 2 more comments
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_())
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
|
show 2 more comments
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_())
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_())
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
|
show 2 more comments
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
|
show 2 more comments
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
YO 4MG,DnsTVitojpqlUaE3utsTTTCOxSYTeGURAOVzL5t,Dw,zsmCs,Lon6