Results 1 to 2 of 2

Thread: Border style and color for QChart

  1. #1
    Join Date
    Jun 2021
    Posts
    1
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows Android

    Default Border style and color for QChart

    Hello,

    I want to add border style and color for a QChart like button, combobox, etc (

    Sample with button in CSS:
    QPushButton {
    background: qlineargradient( x1:0 y1:1, x2:1 y2:0, stop:0 #D5BD9E, stop:1 #B99556);
    color: transparent;
    border-style: outset;
    border-width: 2px;
    border-radius: 10px;
    border-color: #B99556;
    font: bold;
    padding: 2px;
    font-family: Montserrat-SemiBold;
    }

    I can round it with the function "m_chart->setBackgroundRoundness(10)" but I didn't find any fucntion to add a border.

    Can you help me to find a solution?

    Many thanks

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

    Default Re: Border style and color for QChart

    Hi, instead of using CSS you could put it into a QFrame to get a border.

    Ginsengelf

Similar Threads

  1. Replies: 2
    Last Post: 19th July 2013, 10:34
  2. 3D Border Style for Rectangle in QML
    By tauseef in forum Qt Programming
    Replies: 1
    Last Post: 2nd April 2013, 07:10
  3. Replies: 4
    Last Post: 8th September 2011, 09:22
  4. QWidget's border style
    By luochen601 in forum Qt Programming
    Replies: 2
    Last Post: 13th September 2010, 08:17
  5. border color is wrong with "plastique" style in Qt4.2.3
    By alfa_wu in forum Qt Programming
    Replies: 2
    Last Post: 30th April 2007, 05:27

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.