// beispiele/signalslot5/mywindow.cpp
#include "mywindow.h"

MyWindow::MyWindow(QWidget *parent): QWidget(parent) {
   label = new QLabel("alter Text");
   button0 = new QPushButton ("Label aktualisieren");
   button1 = new QPushButton ("Beenden");
   layout = new QVBoxLayout(this);

   layout->addWidget(button0);
   layout->addWidget(button1);
   layout->addWidget(label);
   setLayout(layout);

   connect( button0, SIGNAL( clicked() ),this, SLOT( setText() ) );
   connect( button1, SIGNAL( clicked() ),this, SLOT( quit() ) );
}

void MyWindow::setText() {


    QString str1;
    str1 =label->text();
        int i ;
            i =str1.toInt();
            i++;

QString str2 = QString(" %1").arg(i) ;
         label->setText(str2);
         label->setText(".mal gedrueckt");

}

