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 Initialization
Qt 6.11 is out! See what's new in the release blog

QPixmap Initialization

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 1.4k 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.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #1

    hello, How can i initialise a QPixmap, that i declared in my header file, in my constructor with a Qvariant.

    The QVariantis what i get when i access a picture in the registry.

    I changed managed to change the QVariant into a QPixmap but i do not know how to use it to initialize the QPixmap in my header file.

    The reason for the Global QPixmap is that i am going to use it in various methods.

    1 Reply Last reply
    0
    • C Offline
      C Offline
      ChrisW67
      wrote on last edited by
      #2

      You assign a value to it just like a simple variable. Perhaps you need to elaborate on what you are doing and how it fails.

      1 Reply Last reply
      0
      • ? Offline
        ? Offline
        A Former User
        wrote on last edited by
        #3

        I managed to find a way around it! :-)
        I was using QLabel to display the picture, but for my project comes QLabel to its limits. I am now using QGraphicsView to continue my project.

        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