p3c0
12th June 2010, 13:13
Hello,
i have a form manager.ui whose cpp file manager.cpp is as follows,
#include "manager.h"
#include "ui_manager.h"
manager::manager(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::manager)
{
ui->setupUi(this);
}
manager::~manager()
{
delete ui;
}
void manager::changeEvent(QEvent *e)
{
QMainWindow::changeEvent(e);
switch (e->type()) {
case QEvent::LanguageChange:
ui->retranslateUi(this);
break;
default:
break;
}
}
void manager::on_PB_General_clicked()
{
GetSystem_General();
}
This GetSystem_General() is in file applysettings.cpp file as folows,
#include "applysettings.h"
#include "ui_manager.h"
#include "../extras/Connections.h"
void GetSystem_General()
{
//Here i want to access the manager class's widget QLabel for e.g LB_Cpu and set its text using setText method like,
ui->LB_Cpu->setText("intel");
}
so my question is how to access the manager class widgets in this applysettings.cpp.
i have a form manager.ui whose cpp file manager.cpp is as follows,
#include "manager.h"
#include "ui_manager.h"
manager::manager(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::manager)
{
ui->setupUi(this);
}
manager::~manager()
{
delete ui;
}
void manager::changeEvent(QEvent *e)
{
QMainWindow::changeEvent(e);
switch (e->type()) {
case QEvent::LanguageChange:
ui->retranslateUi(this);
break;
default:
break;
}
}
void manager::on_PB_General_clicked()
{
GetSystem_General();
}
This GetSystem_General() is in file applysettings.cpp file as folows,
#include "applysettings.h"
#include "ui_manager.h"
#include "../extras/Connections.h"
void GetSystem_General()
{
//Here i want to access the manager class's widget QLabel for e.g LB_Cpu and set its text using setText method like,
ui->LB_Cpu->setText("intel");
}
so my question is how to access the manager class widgets in this applysettings.cpp.