GUI.h file
#ifndef MAINWIN_H
#define MAINWIN_H
#include <QMainWindow>
extern bool joonesta_kastid;
extern double graph_red;
extern double graph_green;
extern double graph_blue;
namespace Ui {
class MainWin;
}
{
Q_OBJECT
public:
explicit MainWin
(QWidget *parent
= 0);
~MainWin();
Ui::MainWin *ui;
private slots:
void on_pushButton_clicked();
void on_verticalSlider_valueChanged(int value);
void on_verticalSlider_2_valueChanged(int value);
void on_verticalSlider_3_valueChanged(int value);
void on_verticalSlider_4_valueChanged(int value);
void on_checkBox_2_toggled(bool checked);
void on_checkBox_toggled(bool checked);
void on_pushButton_2_clicked();
public slots:
void on_spinBox_valueChanged(int arg1);
void update_graph_colors();
void update_gui();
void uuenda_joonistus_seaded();
void on_horizontalSlider_valueChanged(int value);
};
#endif // MAINWIN_H
#ifndef MAINWIN_H
#define MAINWIN_H
#include <QMainWindow>
extern bool joonesta_kastid;
extern double graph_red;
extern double graph_green;
extern double graph_blue;
namespace Ui {
class MainWin;
}
class MainWin : public QMainWindow
{
Q_OBJECT
public:
explicit MainWin(QWidget *parent = 0);
~MainWin();
Ui::MainWin *ui;
private slots:
void on_pushButton_clicked();
void on_verticalSlider_valueChanged(int value);
void on_verticalSlider_2_valueChanged(int value);
void on_verticalSlider_3_valueChanged(int value);
void on_verticalSlider_4_valueChanged(int value);
void on_checkBox_2_toggled(bool checked);
void on_checkBox_toggled(bool checked);
void on_pushButton_2_clicked();
public slots:
void on_spinBox_valueChanged(int arg1);
void update_graph_colors();
void update_gui();
void uuenda_joonistus_seaded();
void on_horizontalSlider_valueChanged(int value);
};
#endif // MAINWIN_H
To copy to clipboard, switch view to plain text mode
GUI.cpp
#include "mainwin.h"
#include "ui_mainwin.h"
#include <QThread>
#include "openglwindow.h"
double graph_red;
double graph_green;
double graph_blue;
bool joonesta_kastid;
MainWin
::MainWin(QWidget *parent
) : ui(new Ui::MainWin)
{
ui->setupUi(this);
// ui->horizontalSlider->setDisabled(true);
}
MainWin::~MainWin()
{
delete ui;
}
void MainWin::update_gui()
{
ui->label_4->setText("eeeeeeee"); <<------------------- it wont do anything visible on gui.
// ui->horizontalSlider->setValue(Lugemis_kaugus/LEVEL.size());
// ui->label_2->setNum(Lugemis_kaugus);
//double size = LEVEL.size();
// ui->label_3->setNum(size);
}
Removed some below
#include "mainwin.h"
#include "ui_mainwin.h"
#include <QThread>
#include "openglwindow.h"
double graph_red;
double graph_green;
double graph_blue;
bool joonesta_kastid;
MainWin::MainWin(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWin)
{
ui->setupUi(this);
// ui->horizontalSlider->setDisabled(true);
}
MainWin::~MainWin()
{
delete ui;
}
void MainWin::update_gui()
{
ui->label_4->setText("eeeeeeee"); <<------------------- it wont do anything visible on gui.
// ui->horizontalSlider->setValue(Lugemis_kaugus/LEVEL.size());
// ui->label_2->setNum(Lugemis_kaugus);
//double size = LEVEL.size();
// ui->label_3->setNum(size);
}
Removed some below
To copy to clipboard, switch view to plain text mode
Try to execute:
MainWin ee;
ee.update_gui();
MainWin ee;
ee.update_gui();
To copy to clipboard, switch view to plain text mode
From main.cpp and it goes trough code lines in debug but labels string wont change.
How to set ui components from seperate file?
Bookmarks