Layering two widgets while retaining layout capacities



  • 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??



  • 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>
    @


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.