Hi,
Thanks for your quick reply . I once again posted my clear code what I want .
mainwin.cpp
#include "mainwin.h"
mainwin.
h::lpsu_application(QWidget *parent
){
setupUi(this);
}
void mainwin.h::on_Pushbutton1_Button_clicked()
{
timer
= new QTimer(this);
// it is decleare in .h file as QTimer *timer as public connect(timer, SIGNAL(timeout()), this, SLOT(Averagedata()));
timer->start(10);
}
void mainwin.h::on_Pushbutton2_Button_clicked()
{
channel dialog(this);
dialog.exec();
}
#include "mainwin.h"
mainwin.h::lpsu_application(QWidget *parent)
: QMainWindow(parent)
{
setupUi(this);
QMainWindow::showMaximized();
}
void mainwin.h::on_Pushbutton1_Button_clicked()
{
timer = new QTimer(this); // it is decleare in .h file as QTimer *timer as public
connect(timer, SIGNAL(timeout()), this, SLOT(Averagedata()));
timer->start(10);
}
void mainwin.h::on_Pushbutton2_Button_clicked()
{
channel dialog(this);
dialog.exec();
}
To copy to clipboard, switch view to plain text mode
channel.cpp
#include "channel.h"
temperature_pane
::temperature_pane(QWidget *parent
){
setupUi(this);
mainwin oman; // included "mainwin.h" in .h file of this class
oman.timer->stop();
}
#include "channel.h"
temperature_pane::temperature_pane(QWidget *parent)
: QDialog(parent)
{
setupUi(this);
mainwin oman; // included "mainwin.h" in .h file of this class
oman.timer->stop();
}
To copy to clipboard, switch view to plain text mode
So here i want to stop the timer started in mainwin.cpp in the channel.cpp.But if i click on Pushbutton2 the execution was stoping and showing some error which I posted in previous post.
So please help me to solve the pronlem
with Regards
Sudheer.
Bookmarks