Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. How to place widgets on an image properly ?
Forum Updated to NodeBB v4.3 + New Features

How to place widgets on an image properly ?

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
4 Posts 2 Posters 303 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.
  • L Offline
    L Offline
    LRDPRDX
    wrote on last edited by LRDPRDX
    #1

    Dear Forum,

    I must say that I don't know if the title describes my wish correctly. Let me show what I mean. Suppose I want to draw lines between widgets to add visual context to their meaning (f.e. comboboxes in the picture below could choose the subtree: left or right):

    bar.png

    How do I suppose to add those black lines between the widgets (I added those lines in an image editor to demonstrate the intention) ? I've come up with a solution of changing the background. So, for example, first I place my widgets somehow and then I create a transparrent SVG with those lines and place this image behind the widgets layer. Is there a better approach ? And is it possible to achieve this using QML only ? I am not asking for a ready-to-use example --- a direction would be even better.

    (Or remember the hero window in HOMM3 :)) :

    homm.png

    Thank you in advance !

    B 1 Reply Last reply
    0
    • L LRDPRDX

      Dear Forum,

      I must say that I don't know if the title describes my wish correctly. Let me show what I mean. Suppose I want to draw lines between widgets to add visual context to their meaning (f.e. comboboxes in the picture below could choose the subtree: left or right):

      bar.png

      How do I suppose to add those black lines between the widgets (I added those lines in an image editor to demonstrate the intention) ? I've come up with a solution of changing the background. So, for example, first I place my widgets somehow and then I create a transparrent SVG with those lines and place this image behind the widgets layer. Is there a better approach ? And is it possible to achieve this using QML only ? I am not asking for a ready-to-use example --- a direction would be even better.

      (Or remember the hero window in HOMM3 :)) :

      homm.png

      Thank you in advance !

      B Offline
      B Offline
      Bob64
      wrote on last edited by
      #2

      @LRDPRDX The transparent SVG approach should work I guess. If you needed something a little more dynamic, perhaps you could use Canvas to draw lines between your widgets?

      L 1 Reply Last reply
      0
      • B Bob64

        @LRDPRDX The transparent SVG approach should work I guess. If you needed something a little more dynamic, perhaps you could use Canvas to draw lines between your widgets?

        L Offline
        L Offline
        LRDPRDX
        wrote on last edited by
        #3

        @Bob64 Thank you for your reply. I don't require dynamics explicitely. F.e., I don't even want the window to be resized, but I want to be sure I will not come with something messy in different language, f.e., you see.

        I see there is another similar question here: https://forum.qt.io/topic/118717/how-to-draw-on-other-qwidgets

        B 1 Reply Last reply
        0
        • L LRDPRDX

          @Bob64 Thank you for your reply. I don't require dynamics explicitely. F.e., I don't even want the window to be resized, but I want to be sure I will not come with something messy in different language, f.e., you see.

          I see there is another similar question here: https://forum.qt.io/topic/118717/how-to-draw-on-other-qwidgets

          B Offline
          B Offline
          Bob64
          wrote on last edited by
          #4

          @LRDPRDX OK, if all the sizes are completely fixed, maybe svg would be the most straightforward approach.

          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