Also expose signals and slots to pyqt
Demo in test.py (quit QT when the shell finishes)
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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_()
|
||||
|
||||
Reference in New Issue
Block a user