Results 1 to 3 of 3

Thread: How to prevent child items to do not draw theirself outside of their parents?

  1. #1
    Join Date
    Jan 2012
    Location
    Iran, Tehran
    Posts
    308
    Thanks
    75
    Thanked 24 Times in 21 Posts
    Qt products
    Qt4 Qt5 PyQt3 PyQt4
    Platforms
    Unix/X11 Windows

    Default How to prevent child items to do not draw theirself outside of their parents?

    hi all..
    I have an child item and a parent one. When i draw child one and when its size is bigger than its parent, i don't want to it draw itself outside of its parent.
    Is it possible?

    Thanks

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: How to prevent child items to do not draw theirself outside of their parents?

    Yes, set the "clip" property of the parent item to true.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. The following user says thank you to wysota for this useful post:

    alizadeh91 (2nd July 2012)

  4. #3
    Join Date
    May 2012
    Location
    Bangalore, India
    Posts
    271
    Thanks
    29
    Thanked 50 Times in 47 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: How to prevent child items to do not draw theirself outside of their parents?

    yup thats right....

Similar Threads

  1. Getting Child Items from QStandardItemModel
    By nikhilqt in forum Qt Programming
    Replies: 4
    Last Post: 4th June 2013, 16:10
  2. Replies: 1
    Last Post: 14th January 2012, 01:33
  3. Replies: 1
    Last Post: 8th October 2011, 20:15
  4. QTreeWidget Infinity Child items
    By aekilic in forum Qt Programming
    Replies: 2
    Last Post: 1st June 2009, 14:19
  5. how to distroy child window which parents is zero
    By rajesh in forum Qt Programming
    Replies: 4
    Last Post: 22nd June 2006, 09:52

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.