After trying to fix my other issue, I finally tried your answer
m_opaque->setAttribute( Qt::WA_TranslucentBackground, false );
m_opaque->setAttribute( Qt::WA_TranslucentBackground, false );
To copy to clipboard, switch view to plain text mode
but this does not work either. To be specific, I am trying to show the status bar from my other question with grey brackground. Currently, if I use
setAttribute(Qt::WA_TranslucentBackground);
setAttribute(Qt::WA_TranslucentBackground);
To copy to clipboard, switch view to plain text mode
in my main window constructor, nothing I do seems to be able to get rid of the transparency.
Furthermore, I remembered that already noticed before that after show(), nothing I tried was able to change this attribute / transparency setting (and vice-versa: after show(), activating WA_TranslucentBackground does nothing). My only way out to go from transparent to non-transparent widgets in my window was to destroy the whole window and create a new one. However now I need a QLabel with transparency, and a QStatusBar without transparency in the same window ...
I also found some bug reports about seemingly similar issues, but nothing that looked exactly the same as mine, so not sure what the status on this is.
Edit: turns out my style sheet syntax was wrong .. the following
m_opaque->->setStyleSheet("background-color: grey");
m_opaque->->setStyleSheet("background-color: grey");
To copy to clipboard, switch view to plain text mode
works. Still strange none of the other options show any affect, but at least I can use this.
Bookmarks