Results 1 to 4 of 4

Thread: Sharing same widget between 2 wizards

  1. #1
    Join Date
    Jun 2006
    Posts
    32
    Thanks
    1
    Thanked 1 Time in 1 Post

    Default Sharing same widget between 2 wizards

    Hi all , I have aquestion.

    I've been trying to share same widget between 2 different wizrads on my app.

    I create the widget as a child of those 2 wizard

    call wizard 1 InsertPage -> its fine.
    call wizard 2 InsertPage -> this cause the wizard 1 to loose the page


    Why?


    Thanks in advance

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Sharing same widget between 2 wizards

    A child widget (page) can only have one parent (wizard) at time. In another words, it can only be inside one parent widget at time. You cannot put one child widget inside two different parent widgets. You will have to instantiate two instances of the page widget or move it dynamically from one wizard to the another when required.
    J-P Nurmi

  3. #3
    Join Date
    Jun 2006
    Posts
    32
    Thanks
    1
    Thanked 1 Time in 1 Post

    Default Re: Sharing same widget between 2 wizards

    thanks , but i can't have two instances of the page widget , so how can i move it dynamically from one wizard to the another , can you assist?

  4. #4
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Sharing same widget between 2 wizards

    Quote Originally Posted by Equilibrium
    how can i move it dynamically from one wizard to the another
    Just re-insert it to the wizard where it will be needed next. It will disappear from the wizard it was previously in, just like you have already noticed.
    J-P Nurmi

Similar Threads

  1. QWidget display on 2 stack widget page
    By spawnwj in forum Qt Programming
    Replies: 3
    Last Post: 4th September 2006, 12:07
  2. Pin/Unpin Dock Widget
    By charlesD in forum Newbie
    Replies: 1
    Last Post: 21st June 2006, 06:57
  3. minimize child widget
    By sreedhar in forum Qt Programming
    Replies: 5
    Last Post: 15th May 2006, 12:02
  4. Replies: 4
    Last Post: 24th March 2006, 22:50
  5. [Qt 4.1.0] Split a widget on demand
    By Townk in forum Qt Programming
    Replies: 3
    Last Post: 17th February 2006, 14:16

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.