I'm new to QT and I want to know how to add a label on a certain position by code. I create a new application and I have these code automatically:
#include "mainwindow.h"
#include "ui_mainwindow.h"
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
}
MainWindow::~MainWindow()
{
delete ui;
}
I want to add a label to a certain position, for example, its geometry is (10, 10, 30, 80). How do I do this by code? Someone can help me?