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. DDS image file paint failed...use QPixmap open the image file, and then covert it to QIcon and paint.
Forum Updated to NodeBB v4.3 + New Features

DDS image file paint failed...use QPixmap open the image file, and then covert it to QIcon and paint.

Scheduled Pinned Locked Moved General and Desktop
3 Posts 1 Posters 694 Views 1 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.
  • O Offline
    O Offline
    opengpu2
    wrote on last edited by opengpu2
    #1

    DDS image file paint failed...use QPixmap open the image file, and then covert it to QIcon and paint.
    the code is like this:
    QPixmap pixmap("...imagePath...");
    QIcon icon = QIcon(pixmap);
    if ( !icon.isNull() )
    {
    icon.paint(......);
    }

    and the QPixmap is read success, because i got its resolution right.
    and the icon is always not Null...it do paint...but for some DDS file, it just paint a white image, or nothing at all....

    1 Reply Last reply
    0
    • O Offline
      O Offline
      opengpu2
      wrote on last edited by opengpu2
      #2

      and for the DDS file which paint into nothing...the ImageMagic Display also display nothing...
      but Photoshop Do Not show Nothing....

      1 Reply Last reply
      0
      • O Offline
        O Offline
        opengpu2
        wrote on last edited by
        #3

        the files all have MipMap...but some are right, however some are wrong....

        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