Repository navigation
Conversation
Test Results0 tests 0 ✅ 0s ⏱️ Results for commit 4c1e97e. ♻️ This comment has been updated with latest results. |
TCanvasImp indicates if gVirtualX methods are involved by the canvas and correspondent libraries need to be initialized. Also use of gVirtualX allows to perform canvas clear or border painting outside of Update() method. Flag is TRUE by default in ROOT6 but will be switched to FALSE in ROOT7.
For TRootCanvas it returns kTRUE, for all others kFALSE
When new implementation assigned to the canvas, call Init() and Build() methods when gVirtualX is not used. It provides "legal" way to prepare TCanvas data after it created with `new TCanvas(kFALSE)` constructor. Such canvas is dummy and many fields are not properly initialized. When external TCanvasImp implementation assigned to the canvas now it will be initilized as any other normal canvas - bit only if IsUseVirtualX() returns false. Also during such initialization graphics libs for gVirtualX will not be loaded.
It dedicated for exteranl usage of TQt6Canvas in existing Qt6 applications. Idea to have simple method to create ROOT TCanvas object for exisitng QWidget and initialize all necessary ROOT classes for that.
linev
force-pushed
the
canvas_demos
branch
2 times, most recently
from
November 13, 2026 13:21
ff9976e to
50d94d4
Compare
Correctly use canvas status bits, remove inherit code from TWebCanvas Provide Close and Show methods which will call correspondent Qt6 methods
Shows drawing of different ROOT classes plus live update Plus demo how show/hide menu, toolbar, events status on such embed canvas
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Provide demo application which embed TQt6Canvas and shows how it can be used with plain Qt6 code.
PR include also changes in base ROOT classes required to correctly initialize such embed canvas.
Therefore it much more than creating demo - it next step to remove hard dependency from TVirtualX code in TCanvas.
Very important changes - new TCanvasImp::IsUseVirtualX() method.
It will be used to isolate all TVirtualX-specific code in TCanvas classes.
Only classical canvas implementation will be allowed to re-paint its content outside of Update() method.
There are not much such places - but all need to be identified and handled.
Also try to address graphics initialization. TCanvas normally loads gVirtualX-related libraries automatically.
But now for embed canvases one tries to avoid this. Later one can try same for normal TCanvas as well.
Work in progress ...