sincerely
Singaporean
If you have not done so, read this full tutorial on how to use SGEXTN to build an application.
class SGRRendererWidget;
part of SGEXTN module SG_RI
SGWidget ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ for SG - RI ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ renderers
list of all including inherited members
preprocessor file inclusion directive: #include ‹SGRRendererWidget.h›
CMake target for BuildLah: SGEXTN::SG_RI
see this link for more information about BuildLah
parent class: SGWWidget
children classes: (none)
SGRRendererWidget(SGWWidget* parent, float x1, float x0, float y1, float y0, float w1, float w0, float h1, float h0, SGRBaseRenderer* renderControl, SGRBaseSyncer* syncControl);
void updateCustomRenderer() const;
SGRRendererWidget contains a SG - RI ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ renderer so that it can be used in the SGWidget ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ system.
SG - RI ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ internally uses QRhi.
Creates a SGRRendererWidget with parent SGWidget ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ parent, w-distance ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ coordinates (x1, x0, y1, y0, w1, w0, h1, h0), SG - RI ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ renderer renderControl, and SG - RI ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ syncer syncControl.
If no syncer is needed for this SGRRendererWidget, syncControl can be nullptr.
The SGRRendererWidget owns the renderer and syncer, they do not need to be deleted manually.
Keep references to the SG - RI ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ renderer and syncer elsewhere in your code since they cannot be accessed using public API provided by SGRRendererWidget.
parent being nullptr is undefined behaviour.
renderControl being nullptr will crash.
To avoid use after free bugs, deleting a SGWWidget directly will cause a crash. Use SGWWidget::deleteWidget to delete it safely.
Calls for the SGRRendererWidget to be redrawn. The SGRRendererWidget will not be redrawn until this is called due to Qt Quick's power usage optimisations.
If a syncer is being used, SGRBaseSyncer::sync will be automatically called, do NOT manually call it.
Only request a redraw if the contents really changed. This can save a lot of battery especially on mobile devices.
©2025 05524F.sg (Singapore)