Earlier last week I created a window in Python that resized the main window to the dimensions of the background image. I wanted to do the same in QT. I've managed to figure out the syntax to resize the main window through its constructor.
this->setFixedSize(QSize(600, 600));
I'm curious how I might now set the width and height parameters to the same parameters of an image in the resource file. I was thinking something like this:
QGraphicsPixmapItem image(QPixmap("url(:/images/background.png);"));
int x = image.width
int y = image.length
this->setFixedSize(QSize(x, y));
edit:
In summary, I want to resize the main window to the same dimensions of an image file which so the window wraps around the background image. According to this post I have to parse the image header to read the dimensions... sounds too complicated. Is there a third party library?