View Issue Details

IDProjectCategoryView StatusLast Update
0036342LazarusLCLpublic2020-03-13 18:30
ReporterChris Rorden Assigned ToZeljan Rikalo  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionreopened 
Platformi7 4790OSUbuntu Debian 
Product Version2.0.7 (SVN) 
Summary0036342: QT5: OpenGL paintEngine error
DescriptionOpenGL projects built for QT5 generate the error "QWidget::paintEngine: Should no longer be called" with each screen refresh.
Steps To ReproduceThis bug is seen with any OpenGL project, but can be elicited with any of the examples that come with Lazarus
1.) Open a OpenGL project, e.g.
~/lazarus/components/opengl/example/testopenglcontext1.lpr
2.) Set for QT5 widgtset
3.) Compile and run from terminal.
4.) See many, many copies of
  QWidget::paintEngine: Should no longer be called
TagsNo tags attached.
Fixed in Revision62760,62763,62764
LazTarget-
WidgetsetQT5
Attached Files

Activities

Zeljan Rikalo

2019-11-25 15:02

developer   ~0119490

Seem that Qt5 cbindings needs change to fix this. QWidget::paintEngine() should be overrided, so best would be to create new specialized QWidget with overrided virtual QWidget::paintEngine().
Here is nice example: https://zeduckmaster.frama.io/2016/how-to-create-a-custom-rendering-in-a-qt5-widget

Zeljan Rikalo

2020-03-13 13:04

developer   ~0121590

hm...I've fixed that (created completely new qlclopenglwidget class), but now I have QPainter::begin: Paint device returned engine == 0, type: 1 and everything is correctly painted.

Zeljan Rikalo

2020-03-13 14:49

developer   ~0121591

cbindings are updated in r62760 - you should rebuild it on your own , version of libQt5Pas is 1.2.8 from now on.

Zeljan Rikalo

2020-03-13 14:50

developer   ~0121592

pure opengl is still to implement.

Zeljan Rikalo

2020-03-13 15:00

developer   ~0121593

Please test and close if ok. Note that you MUST rebuild libQt5Pas from lazarus trunk (cbindings) for this to work.

Zeljan Rikalo

2020-03-13 15:13

developer   ~0121594

One more commit - fixed paint event

Chris Rorden

2020-03-13 18:30

reporter   ~0121596

Tested. Fixes the issue. Launching applications causes a lot of initial debug information - is there an option to silence this? Very minor comment, just curious.

created new form 814x698
create TCheckBox 86x18
create TCheckBox 90x18
create TMemo 243x132
create TPanel 4x482
create TGroupBox 20x482
create TMemo 0x257
create TMemo 0x400
create TSplitter 0x12
create TSplitter 12x482
create TSplitter 12x482
create TPanel 643x482
create TSplitter 927x12
...
create TOpenGLControl 160x90

Issue History

Date Modified Username Field Change
2019-11-22 22:19 Chris Rorden New Issue
2019-11-24 09:46 Zeljan Rikalo Assigned To => Zeljan Rikalo
2019-11-24 09:46 Zeljan Rikalo Status new => assigned
2019-11-25 15:02 Zeljan Rikalo Note Added: 0119490
2020-03-13 13:04 Zeljan Rikalo Note Added: 0121590
2020-03-13 14:49 Zeljan Rikalo Status assigned => resolved
2020-03-13 14:49 Zeljan Rikalo Resolution open => fixed
2020-03-13 14:49 Zeljan Rikalo Fixed in Revision => 62760
2020-03-13 14:49 Zeljan Rikalo LazTarget => -
2020-03-13 14:49 Zeljan Rikalo Widgetset QT5 => QT5
2020-03-13 14:49 Zeljan Rikalo Note Added: 0121591
2020-03-13 14:50 Zeljan Rikalo Status resolved => feedback
2020-03-13 14:50 Zeljan Rikalo Resolution fixed => reopened
2020-03-13 14:50 Zeljan Rikalo Note Added: 0121592
2020-03-13 15:00 Zeljan Rikalo Status feedback => resolved
2020-03-13 15:00 Zeljan Rikalo Fixed in Revision 62760 => 62760,62763
2020-03-13 15:00 Zeljan Rikalo Widgetset QT5 => QT5
2020-03-13 15:00 Zeljan Rikalo Note Added: 0121593
2020-03-13 15:13 Zeljan Rikalo Status resolved => assigned
2020-03-13 15:13 Zeljan Rikalo Status assigned => resolved
2020-03-13 15:13 Zeljan Rikalo Fixed in Revision 62760,62763 => 62760,62763,62764
2020-03-13 15:13 Zeljan Rikalo Widgetset QT5 => QT5
2020-03-13 15:13 Zeljan Rikalo Note Added: 0121594
2020-03-13 18:30 Chris Rorden Status resolved => closed
2020-03-13 18:30 Chris Rorden Note Added: 0121596