Understanding Qt-3 | Adding fuctionalaties in Push Button

 1.) Create a New Project 

      create a widget like this by drag & drop 

            

now we are in need to add ,, onclick , show me " Hello your name ..........."

            for this 1st we have to  Right Click on " QClick"

                                      them,, "go to slot"

                                                select " clicked() "


2.) Then open " main.cpp "

               frequently, it will open " constructer with required code asking to write "

 #include "dialog.h"

#include "ui_dialog.h"

Dialog::Dialog(QWidget *parent)
    : QDialog(parent)
    , ui(new Ui::Dialog)
{
    ui->setupUi(this);
}

Dialog::~Dialog()
{
    delete ui;
}


void Dialog::on_pushButton_clicked()
{
    ui->lineEdit->setText("Welcome to the world of Qt Crearor with Push_Button");
}

     we have to write only " yellow highlithed code.

Comments

Popular posts from this blog

Generating a signed apk from Qt Creator

How make Signed Firmware from official Ardupilot using Cryptography

Drone Jamming & Detecting System :