-
Created by Unknown User (jarisav), last modified on 29.11.2009
You are viewing an old version of this page. View the current version.
Compare with Current
View Page History
« Previous
Version 4
Next »
#include "dialog.h"
#include "ui_dialog.h"
Dialog::Dialog(QWidget *parent): QDialog(parent), ui(new Ui::Dialog)
{
ui->setupUi(this);
timer = new QTimer(this);
connect(timer, SIGNAL(timeout()), this, SLOT(update()));
timer->start(1000);
Arvo=0;
}
Dialog::~Dialog()
{
delete ui;
}
void Dialog::update()
{
Arvo++;
ui->dial->setValue(Arvo);
}
p, li { white-space: pre-wrap; }
#ifndef DIALOG_H
#define DIALOG_H
#include <QtGui/QDialog>
#include <QTimer>
namespace Ui
{
class Dialog;
}
class Dialog : public QDialog
{
Q_OBJECT
public:
Dialog(QWidget *parent = 0);
~Dialog();
private slots:
void update();
private:
Ui::Dialog *ui;
QTimer *timer;
int Arvo;
};
#endif // DIALOG_H
You must log in to comment.