Normally I use connect with the help buttons to call such functions.
But here in this case as there are no buttons, how to use connect to call such slot functions.
Here is my previous application example code:
{
setupUi(this);
QObject::connect(Start,
SIGNAL(clicked
()),
this,
SLOT(initializeEGUI
()));
QObject::connect(Stop,
SIGNAL(clicked
()),
this,
SLOT(stopEGUI
()));
}
MainWindow::MainWindow(QMainWindow* parent)
: QMainWindow(parent)
{
setupUi(this);
QObject::connect(Start, SIGNAL(clicked()), this, SLOT(initializeEGUI()));
QObject::connect(Stop, SIGNAL(clicked()), this, SLOT(stopEGUI()));
}
To copy to clipboard, switch view to plain text mode
Present application example code:
{
setupUi(this);
}
void MainWindow::displayText(GPSDataType *data)
{
Valid->setText(Q_valid.setNum(data->status));
FixQuality->setText(Q_fixquality.setNum(data->fixquality));
GroundSpeed->setText(Q_groundspeed.setNum(data->groundspeed, 'f', 3));
--------------
-------------
------------
}
MainWindow::MainWindow(QMainWindow* parent)
: QMainWindow(parent)
{
setupUi(this);
}
void MainWindow::displayText(GPSDataType *data)
{
Valid->setText(Q_valid.setNum(data->status));
FixQuality->setText(Q_fixquality.setNum(data->fixquality));
GroundSpeed->setText(Q_groundspeed.setNum(data->groundspeed, 'f', 3));
--------------
-------------
------------
}
To copy to clipboard, switch view to plain text mode
So my question is how to connect such slots without help of any buttons etc. As soon as application starts, the application should connect to displayText function and display the fields.
Thanks & Regards,
Arun.
Bookmarks