Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. Buttons on top of image
Qt 6.11 is out! See what's new in the release blog

Buttons on top of image

Scheduled Pinned Locked Moved Unsolved Qt for Python
5 Posts 2 Posters 2.5k 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.
  • T Offline
    T Offline
    TomyLimon
    wrote on last edited by
    #1

    Hello. I do have image - schema of apartment.
    I need place buttons on top ot each door, each electric switch.
    Can some one suggest how to do it?

    As I understand, to place image can be used object qLabel, but how to place on top of it qPushButton?

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

      Hi and welcome to devnet,

      Don't put the buttons in a layout and manually place them.

      What exactly do you want to do with them ?
      Depending on that, using the graphics view framework might help as well.

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

      T 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi and welcome to devnet,

        Don't put the buttons in a layout and manually place them.

        What exactly do you want to do with them ?
        Depending on that, using the graphics view framework might help as well.

        T Offline
        T Offline
        TomyLimon
        wrote on last edited by
        #3

        @SGaist I need place apartment picture as a background. On top of it I need place 20 buttons. All this buttons can be clicked. To each button will be assigned action.

        It's like different devices placed in apartment and if you click on some device icon it will be activated. Request.get()...

        T 1 Reply Last reply
        0
        • T TomyLimon

          @SGaist I need place apartment picture as a background. On top of it I need place 20 buttons. All this buttons can be clicked. To each button will be assigned action.

          It's like different devices placed in apartment and if you click on some device icon it will be activated. Request.get()...

          T Offline
          T Offline
          TomyLimon
          wrote on last edited by
          #4

          I will try this

          https://stackoverflow.com/questions/49077083/how-to-overlay-widgets-in-pyqt5#:~:text=For a widget to be,will use the second method.

          SGaistS 1 Reply Last reply
          0
          • T TomyLimon

            I will try this

            https://stackoverflow.com/questions/49077083/how-to-overlay-widgets-in-pyqt5#:~:text=For a widget to be,will use the second method.

            SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #5

            @TomyLimon said in Buttons on top of image:

            I will try this

            https://stackoverflow.com/questions/49077083/how-to-overlay-widgets-in-pyqt5#:~:text=For a widget to be,will use the second method.

            That matches my first suggestion.

            What should happen when you click on these buttons ?

            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