Skip to content

GraphicsView: Set a transparent background palette#1383

Merged
j9ac9k merged 1 commit intopyqtgraph:masterfrom
dgoeries:transparent-palette
Oct 13, 2020
Merged

GraphicsView: Set a transparent background palette#1383
j9ac9k merged 1 commit intopyqtgraph:masterfrom
dgoeries:transparent-palette

Conversation

@dgoeries
Copy link
Copy Markdown
Contributor

@dgoeries dgoeries commented Sep 26, 2020

The background of the GraphicsView is blocking other features. In my example a grid in a designer. On the road to set a single viewbox background to white without affecting others:

  • The background of the QPalette is set to transparent.

Before:

qt_graph_no_transparency

After:

qt_graph_transparency

@dgoeries
Copy link
Copy Markdown
Contributor Author

It is a different data update, that is why the Y axis has different values.

@j9ac9k
Copy link
Copy Markdown
Member

j9ac9k commented Oct 1, 2020

Thanks for the PR @dgoeries I'm good with this, but will wait for some more input before merging.

@dgoeries
Copy link
Copy Markdown
Contributor Author

dgoeries commented Oct 3, 2020

thanks very much!

@j9ac9k j9ac9k merged commit 2955b26 into pyqtgraph:master Oct 13, 2020
@j9ac9k
Copy link
Copy Markdown
Member

j9ac9k commented Oct 18, 2020

Unfortunately this PR broke some Qt4 functionality (can't wait to kill off Qt4 support!); I'm going to submit another PR putting this change under an if QT_LIB in ["PyQt5", "PySide2"]

@j9ac9k
Copy link
Copy Markdown
Member

j9ac9k commented Feb 11, 2021

Unfortunately this change has made some significant performance regressions on scatter plots.

I'll dive into the Qt docs to see if there is some kind of alternative/workaround, but we may have to undo this change.

@dgoeries
Copy link
Copy Markdown
Contributor Author

That would be sad, but how? I don't see any difference in fps with the benchmark tool

@dgoeries
Copy link
Copy Markdown
Contributor Author

Testing 0.11.0 with and without this and I see a performance drop.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants