Probably not your problem, but have you tried setAutoFillBackground(true) on your plot? I have that in one of my Qwt apps.
Elvis Den 20 apr. 2018 1:51 fm skrev "Murphy, Sean" <smur...@walbro.com>: > I'm attempting to create a data view that plots sample data from different > data sources using a QwtPlot embedded in a QTableWidget and I'm having a > little trouble getting the plot's palette to hold after calling > QTableWidget::setCellWidget. So the idea is one data source per row, with a > plot and then some statistical data (min, max, mean, and standard deviation > for now). I whipped up some sample code, and it works so far - I'm getting > the plots inserted into the correct column of the table. The problem is > that plot's palette isn't coming out the way I want it. > > I've attached a screenshot of what the my dataPlot class (which inherits > from QwtPlot) looks like both when it's not embedded in a table cell (the > upper half of the application), and what it looks like when it's in the > table cell (lower half). It appears the color of the QwtPlotCurve's pen > remains intact when putting plots in cells, but the plot canvas' background > color is somehow getting over written. Any ideas on how to fix it? > > I've also attached the code. You'll need to download and compile Qwt ( > https://sourceforge.net/projects/qwt/files/qwt/6.1.3/) to attempt to > build/run it, but I'm guessing that the issue would hold for any widget > that is embedded into a QTableWidget's cell? > > I'm using: > Qt 5.9.1 > Qwt 6.1.3 > Windows 7, 64 bit > > Sean > > > This message has been scanned for malware by Forcepoint. > www.forcepoint.com > > _______________________________________________ > Interest mailing list > Interest@qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest > >
_______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest