Issue while generating Digital Membership Card in Qt application
-
Hi everyone, I am currently developing a Membership Card Software using Qt with C++. The purpose of this project is to digitally manage member records and automatically generate membership cards with user details, photos, and QR codes. The application is connected with a database where all member information is stored, and the software is designed to create printable membership cards directly from the system.
While working on the card generation module, I started facing an issue where the application either freezes for a few seconds or does not properly display the generated card preview after saving member details. Sometimes the image is not loading correctly on the card, and in a few cases the QR code section remains blank even though the data is being saved successfully in the database.
The expected behavior is that after entering the member information and clicking the generate button, the software should instantly create and display the digital membership card with all details, including the member photo and QR code. However, instead of displaying the complete card correctly, the UI becomes unresponsive or some elements fail to render properly.
I already checked the database connection, image path handling, and UI update logic, but I am still unable to identify the exact reason behind the issue. I also tried rebuilding the project and testing different image formats, but the problem still persists.
I am using the following development environment:
Qt Version: Qt 6.6
Compiler: MinGW 64-bit
Operating System: Windows 11Below is a simplified version of the relevant code section:
QPixmap pixmap(memberImagePath);
if(!pixmap.isNull()) {
ui->photoLabel->setPixmap(pixmap.scaled(120,120));
}QString qrData = memberName + memberId;
ui->qrLabel->setText(qrData);ui->cardFrame->update();
The application builds successfully, but during runtime the card preview does not behave as expected.
If anyone has faced a similar issue in Qt or has suggestions regarding UI rendering, image handling, or updating widgets dynamically, I would really appreciate your guidance.
-
Hi and welcome to devnet,
How are you generating the images ?
Where are they stored ?
At which resolution ?
How many calls are you making for that ? -
Sounds like a fake post just for the link.