Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. 3rd Party Software
  4. Updating QwtPlot colors
Forum Updated to NodeBB v4.3 + New Features

Updating QwtPlot colors

Scheduled Pinned Locked Moved 3rd Party Software
2 Posts 2 Posters 3.5k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    DBoosalis
    wrote on 17 Aug 2012, 20:31 last edited by
    #1

    I am trying to change the color of a QwtPlot through a user selection from a QColorDialog. The first time I change the color I see it in the Plot's canvas, but after that I do not see it. I know the code is getting executed but the color only changes for the first time. Any ideas on how to work around this.

    I do something like this from my plot widget:

    setCanvasBackground(bgColor);

    Any info very much appreicated.

    [Moderator note: This thread has been split from the unrelated thread in which it was originally posted. Please open new threads for new questions. Thanks. -- mlong]

    1 Reply Last reply
    0
    • M Offline
      M Offline
      messi
      wrote on 21 Aug 2012, 10:07 last edited by
      #2

      Have you checkout the qwt docs:
      http://qwt.sourceforge.net/class_qwt_plot.html#adb0b2e68d86039f86e3240fb399fa0fe

      Using canvas()->setPalette() is a more powerful way to set these colors.

      or you can make a test with stylesheet technik, like:
      QwtPlot::setStyleSheet(" QwtPlot {background-color: #FF0000}");

      1 Reply Last reply
      0

      1/2

      17 Aug 2012, 20:31

      • Login

      • Login or register to search.
      1 out of 2
      • First post
        1/2
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved