Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. International
  3. Polish
  4. Jak zaznaczyć objekt typu QLabel z wczytaną Pixmapą?

Jak zaznaczyć objekt typu QLabel z wczytaną Pixmapą?

Scheduled Pinned Locked Moved Polish
2 Posts 2 Posters 1.3k 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.
  • M Offline
    M Offline
    maniek_1990
    wrote on last edited by
    #1

    Witam jak w temacie, chcę nadać flagę zaznaczenia do objektu typu QLabel gdzie mam wczytaną Pixmape. Chce uzyskać taki efekt jak uzyskałem przy dodaniu flagi ItemIsSelectable dla obiektu QGraphicsItem. Nie mogę znaleść sposobu jak to zrobić dla QLabel.
    Z góry Dziękuje za pomoc

    1 Reply Last reply
    0
    • L Offline
      L Offline
      Lukasyno
      wrote on last edited by
      #2

      może stworzyć klasę dziedziczącą po QLabel, dodać 2 składowe prywatne:
      label i tą flagę. dodać jeszcze funkcję

      @
      QLabel* all_acess() { return label; }
      @

      potem w kodzie gdzie tworzysz ten "ulepszony QLabel" do labela można się odnosić właśnie przez tą metodę.

      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