Float data to a slot

  • I am new to GUI development and I am also quite newbie in C++ so I have no clue how to do this.

    Here is my code:

    @#include "mainwindow.h"
    #include "ui_mainwindow.h"

    extern "C"{
    #include "defines.h"
    #include "tft.h"
    #include "RAI8870.h"
    #include "bmp.h"
    #include "examples.h"

    MainWindow::MainWindow(int *c_ptr, QWidget *parent) :
    ui(new Ui::MainWindow)

    struct Measurement_Data *m_Data = (struct Measurement_Data*)malloc(sizeof(struct Measurement_Data));
    m_Data = L2CAP_server(c_ptr);
    void on_TempButton_clicked(m_Data->temp);


    delete ui;

    void MainWindow::on_TempButton_clicked(float temp)
    unsigned char txt[10] = { 0 };



    void MainWindow::on_HumButton_clicked()


    void MainWindow::on_PresButton_clicked()


    void MainWindow::on_pushButton_4_clicked()

    void MainWindow::on_lcdNumber_overflow()


    I have three measuring data which I store to that m_Data structure which has members temp, humi and pressure. I am trying to get that code working so that when I for example press that TempButton it prints temperature value to the LCD widget and when I press HumButton it prints humidity value to the LCD widget and so on.. I would be very thankful if someone could show me how to do this with one slot so that I could continue by my own.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.