>
>
> Could you send me that section of code, please?
>
>
I made a signal-slot connection of "clicked" signal of a button and
"myReset" slot of spinbox.

mainwindow.h is as follows:

 #ifndef MAINWINDOW_H

#define MAINWINDOW_H

#include <QtGui/QMainWindow>

namespace Ui

{

class MainWindow;

}

class MainWindow : public QMainWindow

{

Q_OBJECT

public:

MainWindow(QWidget *parent = 0);

~MainWindow();



 public slots:

void myReset();



 private:

Ui::MainWindow *ui;

};

#endif // MAINWINDOW_H



mainwindow.cpp is as follows:

 #include "mainwindow.h"

#include "ui_mainwindow.h"

MainWindow::MainWindow(QWidget *parent)

: QMainWindow(parent), ui(new Ui::MainWindow)

{

ui->setupUi(this);

}

MainWindow::~MainWindow()

{

delete ui;

}

void MainWindow::myReset()

{

ui->spinBox->setValue(0);

}



I hope that helps you.

-- 
Thanks & Regards,
Keval Vora.


[Non-text portions of this message have been removed]

Reply via email to