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. [solved] problems with QLabel pixmap
Forum Update on Monday, May 27th 2025

[solved] problems with QLabel pixmap

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 1.0k Views
  • 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.
  • M Offline
    M Offline
    MichelSM
    wrote on last edited by
    #1

    I want to save the image in the pixmap of a QLabel (label name)

    I used this code:

    ui-> label-> pixmap () -> save ("/ tmp / test", "GIF", -1);

    but it does not work, does not generate image ...

    I am using linux ubuntu, with Qt 5.2 verção
    (5.0)

    Can anyone help me or show me an example of how to do this?

    1 Reply Last reply
    0
    • K Offline
      K Offline
      kqt-mr-nv6
      wrote on last edited by
      #2

      Qt does not support GIF writing/saving,

      check this link for supported formats

      "http://qt-project.org/doc/qt-5.1/qtgui/qpixmap.html#reading-and-writing-image-files
      ":http://qt-project.org/doc/qt-5.1/qtgui/qpixmap.html#reading-and-writing-image-files

      1 Reply Last reply
      0
      • M Offline
        M Offline
        MichelSM
        wrote on last edited by
        #3

        uhahuahu
        thank you very much
        worked perfectly using JPG

        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