Results 1 to 9 of 9

Thread: Sharing a QTreeWidget item across two tabs in Pyside2

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,321
    Thanks
    316
    Thanked 871 Times in 858 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Sharing a QTreeWidget item across two tabs in Pyside2

    If you are reading from an XML file, then I suggest you read the file into a QDomDocument instance. If you keep the data this way, it makes it easy to find an element at any level of the document, using QDomDocument::elementsByTagName(). It is also easy to build the tree from that point - just follow the QDomNodeList down deeper into the document.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

  2. The following user says thank you to d_stranz for this useful post:

    supratik (14th October 2020)

  3. #2
    Join Date
    Aug 2019
    Posts
    15
    Thanks
    6
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Sharing a QTreeWidget item across two tabs in Pyside2

    Thanks a lot
    I created two instances of the QTreeWidget and modified my code.
    It was worth learning for newbie like myself.
    I will use this forum again and hope to learn more

Similar Threads

  1. Replies: 0
    Last Post: 21st October 2013, 09:16
  2. Replies: 4
    Last Post: 8th April 2011, 20:59
  3. Sharing the same widget object between several tabs
    By Lipton in forum Qt Programming
    Replies: 4
    Last Post: 24th April 2010, 15:21
  4. popupmenu for QTreeWidget's item when a particular item selected.
    By vinod sharma in forum Best Practices in Qt Programming
    Replies: 1
    Last Post: 22nd January 2010, 10:45
  5. Replies: 1
    Last Post: 20th January 2010, 08:38

Tags for this Thread

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
  •  
Qt is a trademark of The Qt Company.