Added an example for PyQt5 (#389)

* added pyqt5 example

* fixed example path on build

* improved pyqt example

* simplified example
This commit is contained in:
willbelr
2020-12-24 08:44:23 -05:00
committed by GitHub
parent 7514ebbe1a
commit 380e812373
11 changed files with 24 additions and 2 deletions
+19
View File
@@ -0,0 +1,19 @@
#include "remoteterm.h"
#include <QApplication>
#include <QDebug>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
if(a.arguments().size() != 3){
qDebug() << "Example(client-side) for remote terminal of QTermWidget.";
qDebug() << QString("Usage: %1 ipaddr port").arg(a.arguments()[0]);
return 1;
}
QString ipaddr = a.arguments().at(1);
quint16 port = a.arguments().at(2).toUShort();
RemoteTerm w(ipaddr,port);
w.show();
return a.exec();
}