

The trick was to get the function name through ctypes, I've only been able to find the exported function names in Linux and Windows (but I wasn't able to test it there): Note that a similar effect can probably be achieved by using "abstract" drawing of a private QGraphicsScene within the QGraphicsEffect itself, but it would be much more slower (since you'll have to create new QGraphicsPixmapItems each time the draw() method of the effect is called) and would probably have some side effects. I've been able to achieve it by borrowing some code from a Live tv viewer known as Atropine, the interesting parts is in the effects.py source. IMPORTANT: Consider that this is some sort of a hack, because it uses a private and undocumented function of Qt (which is the same used by QGraphicsBlurEffect) and it's not guaranteed it will work everywhere. Well, I eventually decided it was fun to do it :-) It looks especially bad if you indicate a weak light intensity.Īre there any better options to make a neon effect? or why does he look so bad? And the light turned out to be too unnaturalistic, Self.effect = QtWidgets.QGraphicsBlurEffect(blurRadius=blut_L)īut the code is too cumbersome.

Label.resize(self.width(), self.height()) tStyleSheet('background:rgba(0, 0, 0, 0) color:rgba(px '.format(color_L, glass_L,size_L))

QApplication, QGraphicsScene,QGraphicsView, QGraphicsLinearLayout, QGraphicsWidget, QWidget, QLabel)įrom PyQt5.QtCore import QSize, QPoint,Qtįrom PyQt5 import QtCore, QtGui, QtWidgets For this, I built such code import sysįrom PyQt5.QtWidgets import (QRadioButton, QHBoxLayout, QButtonGroup, I want to make a beautiful and juicy neon effect with the ability to control the power of light.
