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
) : ui(new Ui::manager)
{
ui->setupUi(this);
}
manager::~manager()
{
delete ui;
}
void manager
::changeEvent(QEvent *e
) {
switch (e->type()) {
ui->retranslateUi(this);
break;
default:
break;
}
}
void manager::on_PB_General_clicked()
{
GetSystem_General();
}
#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();
}
To copy to clipboard, switch view to plain text mode
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");
}
#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");
}
To copy to clipboard, switch view to plain text mode
so my question is how to access the manager class widgets in this applysettings.cpp.
Bookmarks