Results 1 to 2 of 2

Thread: How to remove some border of QGraphicsRectItem

  1. #1
    Join Date
    Jun 2018
    Posts
    2
    Qt products
    Qt5
    Platforms
    Windows

    Default How to remove some border of QGraphicsRectItem

    Hi!
    I have a rectangle drawn by QGraphicsRectItem and i want to remove some of its border (ex right and left border).

  2. #2
    Join Date
    Jul 2008
    Location
    Germany
    Posts
    506
    Thanks
    11
    Thanked 76 Times in 74 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: How to remove some border of QGraphicsRectItem

    Hi, you could do it the other way round:
    1) subclass QGraphicsRectItem and reimplement the paint() method
    2) set a QPen with width = 0 to remove borders
    3) paint the borders you want yourself.

    Ginsengelf

Similar Threads

  1. How to remove selection border in QListWidget?
    By Cthulhu-28 in forum Qt Programming
    Replies: 0
    Last Post: 27th May 2018, 02:27
  2. Replies: 2
    Last Post: 21st March 2012, 14:30
  3. How to remove the border?
    By P@u1 in forum Newbie
    Replies: 1
    Last Post: 21st June 2011, 23:42
  4. How to remove QMainWindow's title and border
    By meraj ansari in forum Qt Programming
    Replies: 1
    Last Post: 13th May 2010, 17:22
  5. Remove Widget Border?
    By winston2020 in forum Qt Programming
    Replies: 5
    Last Post: 20th October 2008, 05:26

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.