Quantcast
Channel: Jobs
Viewing all articles
Browse latest Browse all 18427

Working with Images in my Mainwindow

$
0
0
Hello everyone! I’m new to Qt and I want to add a image to my Mainwindow and I don’t know how. Through the main of my project I can add a image to a new form, but I don’t know how to add this image to my Mainwindow. To add the image to a new form i’m using the QLabel lib. main.cpp: #include "mainwindow.h" #include <QApplication> #include <QLabel>   int main(int argc, char *argv[]) {     QApplication a(argc, argv);     QLabel label("/home/gbrennon/Downloads/duto.jpg");     label.show();     MainWindow w;     w.show();           return a.exec(); } How can I add the image using some kind of widget? Is there any possible RAD stuff to add the image? Thanks [Edit: Added @ tags around code — mlong]

Viewing all articles
Browse latest Browse all 18427

Latest Images

Trending Articles



Latest Images