X-Git-Url: https://git.ralfj.de/multypo.git/blobdiff_plain/1d03d11fb0aa8e3418597e7c1ab38f2b28d48924..d06ad1b372082777c92dbc4065c0a355bc2bef93:/qt/multypo.cpp?ds=inline diff --git a/qt/multypo.cpp b/qt/multypo.cpp index 6e461e3..a5d8137 100644 --- a/qt/multypo.cpp +++ b/qt/multypo.cpp @@ -2,6 +2,8 @@ #include #include +#include +#include #include #include @@ -11,7 +13,13 @@ MultypoWindow::MultypoWindow(QWidget *parent) : QWidget(parent), xiInited(false) { - + QHBoxLayout *layout = new QHBoxLayout(this); + setLayout(layout); + + mainLabel = new QLabel(this); + layout->addWidget(mainLabel); + + setMinimumSize(300, 300); } MultypoWindow::~MultypoWindow() @@ -50,15 +58,12 @@ void MultypoWindow::showEvent ( QShowEvent * ) XISelectEvents (dpy, winId(), &eventmask, 1); xiInited = true; - - /*activateWindow(); - raise(); - setFocus(Qt::OtherFocusReason);*/ } void MultypoWindow::handleKeyPress(int device, QString string) { qDebug() << "Device" << device << "String" << string; + mainLabel->setText(QString("%1 pressed on %2").arg(string).arg(device)); } bool MultypoWindow::handleX11Event(XEvent *event)