Hello, i created a clickable labels in pixmap, but delay has occurred to open form. Code bellow:
#include "secdialog.h"
#include "ui_secdialog.h"
#include <QPixmap>
SecDialog
::SecDialog(QWidget *parent
) : ui(new Ui::SecDialog)
{
ui->setupUi(this);
QPixmap pix
("C:\\Users\\Edilson\\Documents\\Menu_Inicio\\Imagens\\PratosQuentes.jpg");
ui->label_2->setPixmap(pix);
QPixmap pix2
("C:\\Users\\Edilson\\Documents\\Menu_Inicio\\Imagens\\PratosFrios.jpg");
ui->label_3->setPixmap(pix2);
QPixmap pix3
("C:\\Users\\Edilson\\Documents\\Menu_Inicio\\Imagens\\porcoes.jpg");
ui->label_4->setPixmap(pix3);
QPixmap pix4
("C:\\Users\\Edilson\\Documents\\Menu_Inicio\\Imagens\\Pizzas.jpg");
ui->label_5->setPixmap(pix4);
QPixmap pix5
("C:\\Users\\Edilson\\Documents\\Menu_Inicio\\Imagens\\Lanches.jpg");
ui->label_6->setPixmap(pix5);
QPixmap pix6
("C:\\Users\\Edilson\\Documents\\Menu_Inicio\\Imagens\\Bebidas.jpg");
ui->label_7->setPixmap(pix6);
}
SecDialog::~SecDialog()
{
delete ui;
}
#include "secdialog.h"
#include "ui_secdialog.h"
#include <QPixmap>
SecDialog::SecDialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::SecDialog)
{
ui->setupUi(this);
QPixmap pix("C:\\Users\\Edilson\\Documents\\Menu_Inicio\\Imagens\\PratosQuentes.jpg");
ui->label_2->setPixmap(pix);
QPixmap pix2("C:\\Users\\Edilson\\Documents\\Menu_Inicio\\Imagens\\PratosFrios.jpg");
ui->label_3->setPixmap(pix2);
QPixmap pix3("C:\\Users\\Edilson\\Documents\\Menu_Inicio\\Imagens\\porcoes.jpg");
ui->label_4->setPixmap(pix3);
QPixmap pix4("C:\\Users\\Edilson\\Documents\\Menu_Inicio\\Imagens\\Pizzas.jpg");
ui->label_5->setPixmap(pix4);
QPixmap pix5("C:\\Users\\Edilson\\Documents\\Menu_Inicio\\Imagens\\Lanches.jpg");
ui->label_6->setPixmap(pix5);
QPixmap pix6("C:\\Users\\Edilson\\Documents\\Menu_Inicio\\Imagens\\Bebidas.jpg");
ui->label_7->setPixmap(pix6);
}
SecDialog::~SecDialog()
{
delete ui;
}
To copy to clipboard, switch view to plain text mode
Bookmarks