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. Layering two widgets while retaining layout capacities

Layering two widgets while retaining layout capacities

Scheduled Pinned Locked Moved General and Desktop
2 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.
  • M Offline
    M Offline
    Misty River
    wrote on last edited by
    #1

    Hi, here is my problem, I would like to layer two image on top of each other while retaining resizable window capacity.. but I can't use a stacked widget because both images must be visible always... how can I do that??

    1 Reply Last reply
    0
    • T Offline
      T Offline
      thebeast44
      wrote on last edited by
      #2

      I did something similar to that by editing .ui file outside of Qt Creator/Designer.

      1. Create a grid layout and place your images in two different cells and give each of them their own layout.
      2. Open .ui file in some other text editor.
      3. Edit row / column values.

      The grid layout should look something like this:
      @
      <item row="0" column="0">
      <layout containing 1st image>
      </item>
      <item row="1" column="0">
      <layout containing 2nd image>
      </item>
      @

      simply change to:
      @
      <item row="0" column="0">
      <layout containing 1st image>
      </item>
      <item row="0" column="0">
      <layout containing 2nd image>
      </item>
      @

      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