2dpainting
Unsolved
Mobile and Embedded
-
Hi,
I can build and run the example "2dpainting" on my Host PC (Ubuntu20.04).
I copy the whole example directory to my embedded device (google-coral dev board).
I can build the example project but run uncorrect.
It show my the whole black window.
I add some related library in 2dpaint.proLIBS += -lGLESv2 -lm -lEGL -lwayland-client -lwayland-egl
It show something, but some color in opengl is wrong.
So I change some code in helper.cpp paint brush in exmaple.
ex:QLinearGradient gradient(QPointF(50, -20), QPointF(80, 20)); gradient.setColorAt(0.0, Qt::white); gradient.setColorAt(1.0, QColor(0xa6, 0xce, 0x39)); background = QBrush(QColor(64, 32, 64)); circleBrush = QBrush(gradient); circlePen = QPen(Qt::black); circlePen.setWidth(1); textPen = QPen(Qt::white); textFont.setPixelSize(50);
change to
/* QLinearGradient gradient(QPointF(50, -20), QPointF(80, 20)); gradient.setColorAt(0.0, QColor(255,255,255)); gradient.setColorAt(1.0, QColor(0xa6, 0xce, 0x39)); */ background = QBrush(QColor(64, 32, 64)); circleBrush = QBrush(QColor(0xa6,0xce,0x39)); circlePen = QPen(Qt::black); circlePen.setWidth(1); textPen = QPen(Qt::red); //white is also work textFont.setPixelSize(50);
Here is two problem
- How to fix QLinearGradient ?
- How to cancel the white background on text(Qt) ?