Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QPixMap not loading, Error : <Information not available, no symbols loaded for Qt5Gui.dll>
Forum Updated to NodeBB v4.3 + New Features

QPixMap not loading, Error : <Information not available, no symbols loaded for Qt5Gui.dll>

Scheduled Pinned Locked Moved Unsolved General and Desktop
12 Posts 4 Posters 1.9k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A avinash_pai

    Trying to load a png file using QImage/QPixmap. It's compiling and linking fine, when I try to execute the code, I am seeing the below error :
    QImage object is null.

    K Offline
    K Offline
    koahnig
    wrote on last edited by
    #2

    @avinash_pai

    Hi and welcome to devnet forum

    Are you using Qt creator when running into that problem?

    Vote the answer(s) that helped you to solve your issue(s)

    1 Reply Last reply
    0
    • A Offline
      A Offline
      avinash_pai
      wrote on last edited by
      #3

      @koahnig said in QPixMap not loading, Error : <Information not available, no symbols loaded for Qt5Gui.dll>:

      e you using Qt creator when running into that problem?

      Thanks for the quick reply. I am running it from Visual Studio 2015, which uses Qt libraries.

      K 1 Reply Last reply
      0
      • A avinash_pai

        @koahnig said in QPixMap not loading, Error : <Information not available, no symbols loaded for Qt5Gui.dll>:

        e you using Qt creator when running into that problem?

        Thanks for the quick reply. I am running it from Visual Studio 2015, which uses Qt libraries.

        K Offline
        K Offline
        koahnig
        wrote on last edited by
        #4

        @avinash_pai

        Are you following some guidelines like this here https://doc.qt.io/qtvstools/index.html

        AFAIK when using Qt libs directly with Visual Studio you are required to use such tools.

        Based on your error message Qt libs are probably not installed as requried. Possibly some path setting is missing. However, I am not familiar with Visual Studio and the setup required of Qt libs.

        An alternative would be using Qt creator together with the Visual Studio compiler.

        Vote the answer(s) that helped you to solve your issue(s)

        1 Reply Last reply
        1
        • A Offline
          A Offline
          avinash_pai
          wrote on last edited by
          #5

          I was able to load the png file in Qt Creator. In my project we use the Qt-everywhere source code and build the libraries and then use it in visual Studio. Any leads will be helpful.
          Thanks.

          1 Reply Last reply
          0
          • A Offline
            A Offline
            avinash_pai
            wrote on last edited by
            #6

            Any leads will be helpful on this. Alternate suggestions for rendering png, jpeg images will also be helpful.

            mrjjM 1 Reply Last reply
            0
            • A avinash_pai

              Any leads will be helpful on this. Alternate suggestions for rendering png, jpeg images will also be helpful.

              mrjjM Offline
              mrjjM Offline
              mrjj
              Lifetime Qt Champion
              wrote on last edited by
              #7

              @avinash_pai
              Hi
              Why are you compiling your own version of Qt ?
              Also Visual 2015 is rather old now. What Qt do you use with it?

              If you run the app standalone, will it then show image ?

              1 Reply Last reply
              1
              • A Offline
                A Offline
                avinash_pai
                wrote on last edited by
                #8

                We are using Qt as one of the third party libraries. I am using Q5.12.
                If I use QImage and QPainter in Qt creator, I am able to load the image. But when I try in Visual Studio, there is no data in the QImage instance.

                jsulmJ 1 Reply Last reply
                0
                • A avinash_pai

                  We are using Qt as one of the third party libraries. I am using Q5.12.
                  If I use QImage and QPainter in Qt creator, I am able to load the image. But when I try in Visual Studio, there is no data in the QImage instance.

                  jsulmJ Offline
                  jsulmJ Offline
                  jsulm
                  Lifetime Qt Champion
                  wrote on last edited by
                  #9

                  @avinash_pai Please show your code

                  https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply
                  0
                  • A Offline
                    A Offline
                    avinash_pai
                    wrote on last edited by
                    #10

                    I implemented the same code in QtCreator , it worked. Not working in Visual Studio.

                    void BqtOglCanvas::drawImage(int width, int height, BmRect imageRect)
                    {
                    	
                    	imgFlag = true;
                    
                    	resultSize = QSize(width, height);
                            paintRect = QRect(QPoint(imageRect.pnt1.x, imageRect.pnt1.y), QPoint(imageRect.pnt2.x, imageRect.pnt2.y));
                    }
                    
                    QImage* BqtOglCanvas::loadImage(const QString &fileName, QImage *image) {
                    
                    	image->load(fileName);
                    
                    	*image = image->scaled(resultSize, Qt::KeepAspectRatio);
                    
                    	return image;
                    }
                    
                    QImage BqtOglCanvas::getSourceImage() {
                    	return sourceImage;
                    }
                    
                    void BqtOglCanvas::paintEvent(QPaintEvent *e)
                    {
                    	
                    	if (imgFlag) {
                    		imgFlag = false;
                    
                    		QImage sourceImage = getSourceImage();
                    
                    		QImage* img = loadImage("C:/Users/qu826e/Downloads/ply.png", &sourceImage);
                    		
                    		const QRect imageRect = paintRect;
                    		const QImage resImage = *img;
                    		QPainter painter(this);
                    		painter.drawImage(imageRect, resImage);
                    	}
                    }
                    
                    jsulmJ 1 Reply Last reply
                    0
                    • A avinash_pai

                      I implemented the same code in QtCreator , it worked. Not working in Visual Studio.

                      void BqtOglCanvas::drawImage(int width, int height, BmRect imageRect)
                      {
                      	
                      	imgFlag = true;
                      
                      	resultSize = QSize(width, height);
                              paintRect = QRect(QPoint(imageRect.pnt1.x, imageRect.pnt1.y), QPoint(imageRect.pnt2.x, imageRect.pnt2.y));
                      }
                      
                      QImage* BqtOglCanvas::loadImage(const QString &fileName, QImage *image) {
                      
                      	image->load(fileName);
                      
                      	*image = image->scaled(resultSize, Qt::KeepAspectRatio);
                      
                      	return image;
                      }
                      
                      QImage BqtOglCanvas::getSourceImage() {
                      	return sourceImage;
                      }
                      
                      void BqtOglCanvas::paintEvent(QPaintEvent *e)
                      {
                      	
                      	if (imgFlag) {
                      		imgFlag = false;
                      
                      		QImage sourceImage = getSourceImage();
                      
                      		QImage* img = loadImage("C:/Users/qu826e/Downloads/ply.png", &sourceImage);
                      		
                      		const QRect imageRect = paintRect;
                      		const QImage resImage = *img;
                      		QPainter painter(this);
                      		painter.drawImage(imageRect, resImage);
                      	}
                      }
                      
                      jsulmJ Offline
                      jsulmJ Offline
                      jsulm
                      Lifetime Qt Champion
                      wrote on last edited by
                      #11

                      @avinash_pai said in QPixMap not loading, Error : <Information not available, no symbols loaded for Qt5Gui.dll>:

                      QImage* img = loadImage("C:/Users/qu826e/Downloads/ply.png", &sourceImage);

                      Is it this QImage which is null? Does the file exist? Is the PNG file valid?

                      https://forum.qt.io/topic/113070/qt-code-of-conduct

                      1 Reply Last reply
                      1
                      • A Offline
                        A Offline
                        avinash_pai
                        wrote on last edited by
                        #12

                        yes this one is null. The file exists and is valid

                        1 Reply Last reply
                        0

                        • Login

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • Users
                        • Groups
                        • Search
                        • Get Qt Extensions
                        • Unsolved