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:: scaled: Pixmap is a null Pixmap
Forum Updated to NodeBB v4.3 + New Features

QPixmap:: scaled: Pixmap is a null Pixmap

Scheduled Pinned Locked Moved General and Desktop
4 Posts 4 Posters 38.6k 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.
  • H Offline
    H Offline
    houmingc
    wrote on last edited by
    #1

    I do not know why i am getting above warning. Please assist

    @
    MainWindow w;
    w.setStyleSheet("background-image:url(./file/leftp.svg)");

    @

    1 Reply Last reply
    0
    • E Offline
      E Offline
      euchkatzl
      wrote on last edited by
      #2

      Because the file path you specified is not correct and so the image could not be loaded.

      You could add your image to qt resource system or you have to specify the full path.

      Check this :
      http://doc.qt.io/qt-5/resources.html

      1 Reply Last reply
      1
      • F Offline
        F Offline
        Fabian4
        wrote on last edited by
        #3

        I also get tons of this message:

        qpixmap::scaled: Pixmap is a null pixmap
        

        The thing is, this message is completely useless, since there is no hint about which pixmap it is.
        I don't have the source and debug libs of qt installed.
        Does anyone know if there is a way to find out which pixmap creates these messages?

        1 Reply Last reply
        1
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Hi and welcome to devnet,

          Check all the QPixmap object you create using files. Where are the path of these files pointing to ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          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