Also expose signals and slots to pyqt

Demo in test.py (quit QT when the shell finishes)
This commit is contained in:
Arnout Engelen
2014-12-07 15:14:06 +01:00
parent 11a00b9ee6
commit 0ee95f7104
2 changed files with 21 additions and 0 deletions
+19
View File
@@ -57,6 +57,25 @@ public:
void setMonitorActivity(bool);
void setMonitorSilence(bool);
void setSilenceTimeout(int seconds);
signals:
void finished();
void copyAvailable(bool);
void termGetFocus();
void termLostFocus();
void termKeyPressed(QKeyEvent *);
void urlActivated(const QUrl&);
void bell(const QString& message);
void activity();
void silence();
public slots:
void copyClipboard();
void pasteClipboard();
void pasteSelection();
void zoomIn();
void zoomOut();
void setKeyBindings(const QString & kb);
void clear();
void toggleShowSearchBar();
protected:
void resizeEvent(QResizeEvent *e);
private:
+2
View File
@@ -21,6 +21,7 @@
import sys, signal
from PyQt4 import Qt
from PyQt4.QtCore import SIGNAL, SLOT
import QTermWidget
signal.signal(signal.SIGINT, signal.SIG_DFL)
@@ -29,4 +30,5 @@ a = Qt.QApplication(sys.argv)
w = QTermWidget.QTermWidget()
w.show()
w.connect(w, SIGNAL('finished()'), a, SLOT('quit()'))
a.exec_()