QToolTip opacity
-
wrote on 1 Nov 2018, 02:45 last edited by minjunkim 11 Jan 2018, 04:04
hi,
i want to use QToolTip transparently
i found few solutions in doc.qt
QToolTip { opacity: 100;} is the solution
i try it but does not work..
What is the correct way?
i think that i have to apply some code like this(setAttribute(Qt::WA_TranslucentBackground, true);)
What am I doing wrong?
my code is
mybutton->setToolTip("this test");
setStyleSheet("QToolTip { border: 2px solid darkkhaki; padding: 5px; border-radius: 3px; opacity: 100; }");
-
hi,
i want to use QToolTip transparently
i found few solutions in doc.qt
QToolTip { opacity: 100;} is the solution
i try it but does not work..
What is the correct way?
i think that i have to apply some code like this(setAttribute(Qt::WA_TranslucentBackground, true);)
What am I doing wrong?
my code is
mybutton->setToolTip("this test");
setStyleSheet("QToolTip { border: 2px solid darkkhaki; padding: 5px; border-radius: 3px; opacity: 100; }");
@minjunkim said in QToolTip opacity:
setStyleSheet("QToolTip { border: 2px solid darkkhaki; padding: 5px; border-radius: 3px; opacity: 100; }");
setStyleSheet("QToolTip { border: 2px solid darkkhaki; padding: 5px; border-radius: 3px; background-color: rgba(255,255,0,0); }");
-
@minjunkim said in QToolTip opacity:
setStyleSheet("QToolTip { border: 2px solid darkkhaki; padding: 5px; border-radius: 3px; opacity: 100; }");
setStyleSheet("QToolTip { border: 2px solid darkkhaki; padding: 5px; border-radius: 3px; background-color: rgba(255,255,0,0); }");
-
Hi what platform are you on ?
I had issue on windows 8/10 to make it transparent. -
Hi what platform are you on ?
I had issue on windows 8/10 to make it transparent. -
Hi what platform are you on ?
I had issue on windows 8/10 to make it transparent.@mrjj jep that's the issue.
on windows I have the same issues as the op with the stylesheet and on macOS It works as intended:
-
Hi,
I 'm using the window10 platform.
Is this a platform-specific issue?
Is there any solution?
I never got it to work on win 10. ( worked fine in linux, win 7)
I didn't find any solutions back then but maybe
other have found way now. -
I never got it to work on win 10. ( worked fine in linux, win 7)
I didn't find any solutions back then but maybe
other have found way now. -
wrote on 1 Nov 2018, 09:36 last edited by
I gave up. I would be create custom class and use it.
-
wrote on 10 Mar 2020, 06:42 last edited by
I know this topic is too old but think it help anyone else.
If set stylesheet right after initialisatioin of QApplication like thatQApplication a(argc, argv); qApp->setStyleSheet("QToolTip {opacity: 150;}");
it's take effect.
Then you can just change background or font colors in widgets
mybutton->setToolTip("this test"); mybutton->setStyleSheet("QToolTip {background-color: rgb(0, 0, 0); color: rgb(200, 200, 200);}");
-
I know this topic is too old but think it help anyone else.
If set stylesheet right after initialisatioin of QApplication like thatQApplication a(argc, argv); qApp->setStyleSheet("QToolTip {opacity: 150;}");
it's take effect.
Then you can just change background or font colors in widgets
mybutton->setToolTip("this test"); mybutton->setStyleSheet("QToolTip {background-color: rgb(0, 0, 0); color: rgb(200, 200, 200);}");
wrote on 23 Jan 2021, 02:37 last edited by@Dominikanetz it doesn't work on linux
-
@Dominikanetz it doesn't work on linux
wrote on 9 Mar 2021, 10:34 last edited by@cawell which version of Qt? Unfortunately this has a direct relationship. On version 5.9, everything worked fine everywhere. At 5.12 it was broken and it worked as I mentioned above. I didn't look further