1 Attachment(s)
QwtPlotGrid lines missing at start point
Hello,
I'm simply using QwtPlotgrid to draw line on the QwtPlot.
Normally it draw line on the plot properly.
Now I have 2 theme, default and Dark theme. by default when application starts, open into default theme, and grid lines are also looks proper. After if I changed theme to dark then it turns all the application color to black, at this time also grid line looks proper. Now if I switch application to default theme then grid line at the bottoms get hidden, I don't understand why this happening, please check the attachment.
Attachment 13028
Thanks
Re: QwtPlotGrid lines missing at start point
- Is the effect gone, when resizing the plot ?
- Could you add more items + setting a canvas background ?
- Has your theme change an effect on the geometry of the plot ?
Uwe
Re: QwtPlotGrid lines missing at start point
Quote:
Is the effect gone, when resizing the plot ?
No, these effect gone when I switch theme of application
Quote:
Has your theme change an effect on the geometry of the plot ?
I guess not, as I'm first time working on this qwt libraries, and theme settings not affecting geometry of the plot, as no configuration done for this.
Quote:
Could you add more items + setting a canvas background ?
I'm using dark.qss file to set stylesheet for default and dark theme. And I'm using QGraphicsView not canvas
So based on the selection of theme, it changes the color of objects inside the application.
Like example below,(darktheme.qss)
Code:
{
color: #eff0f1;
background-color: #313634;
selection-background-color:#3dae9;
selection-color: #eff0f1;
}
{
spacing: 5px;
outline: none;
color: #e4f3f3;
margin-bottom: 3px;
}
I have tried to remove everything from dark.qss, just to check does this file affecting while switching theme. So yes after removing dark.qss everything is looks proper, so some settings in the dark.qss affecting this grid, but don't understand which one. The point is I have not use any configuration related to any qwt libraries.
Re: QwtPlotGrid lines missing at start point
I have checked again, in my dark.qss file below stylesheet has been used which affecting grid lines to disable. When I remove this below stylesheet, grid lines looks proper. But I cant remove this stylesheet.
Code:
{
border-radius: 2px;
border: 1px solid #76797C;
}
I dont understand how this affecting the grid lines ?
Re: QwtPlotGrid lines missing at start point
Still I didn't find solution for this, after removing OFrame stylesheet from dark.qss, it looks like working/showing grid lines properly. But I have to use QFrame because it affects the other gui elements.
Please if anyone has any idea how and why this affecting grid line to disable, then reply
Re: QwtPlotGrid lines missing at start point
Quote:
Originally Posted by
npatil15
And I'm using QGraphicsView not canvas...
As your problem is about the plot canvas - not sure what you are doing, but your response doesn't make any sense.
Anyway: here https://sourceforge.net/p/qwt/code/H...s/stylesheets/ you find a couple of sample stylesheets.
Plot items can't be styled using stylesheet as they are no widgets.
Uwe
Re: QwtPlotGrid lines missing at start point
Thanks Uwe, that solves my problem, just need white color that I can manage.