Results 1 to 2 of 2

Thread: Is it possible to add QPen property and stylize it using qss?

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

    Default Is it possible to add QPen property and stylize it using qss?

    I'm trying to set color and width to QPen using qss.
    I've added a QPen property like below
    Qt Code:
    1. Q_PROPERTY( QPen hoveredContentBorder READ hoveredContentBorder WRITE setHoveredContentBorder NOTIFY hoveredContentBorderChanged )
    To copy to clipboard, switch view to plain text mode 
    It doesn't work.

    I also added QBrush property like below and it's working fine.
    Qt Code:
    1. Q_PROPERTY( QBrush hoveredContentFill READ hoveredContentFill WRITE setHoveredContentFill NOTIFY hoveredContentFillChanged )
    To copy to clipboard, switch view to plain text mode 

    I'm using Qt 5.10.1.
    Thanks in advance.

  2. #2
    Join Date
    Jul 2008
    Location
    Germany
    Posts
    456
    Thanks
    10
    Thanked 61 Times in 59 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Is it possible to add QPen property and stylize it using qss?

    Hi, what doesn't work? What did you do the QPen? What did you expect?

    Ginsengelf

Similar Threads

  1. Replies: 1
    Last Post: 24th November 2014, 09:28
  2. QPen has no effect
    By timmu in forum Qt Programming
    Replies: 1
    Last Post: 3rd January 2013, 13:39
  3. QgraphicsSimpleTextItem, QPen outline
    By user14921 in forum Qt Programming
    Replies: 1
    Last Post: 9th October 2011, 17:07
  4. QPen color shift
    By Alberto in forum Qt Programming
    Replies: 0
    Last Post: 22nd October 2008, 12:35
  5. Problems with QPen
    By prosass in forum Newbie
    Replies: 3
    Last Post: 13th March 2007, 16:54

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.