sincerely Singaporean

If you have not done so, read this full tutorial on how to use SGEXTN to build an application.

SGRRendererWidget

see header file

see source file

class SGRRendererWidget;

part of SGEXTN module SG_RI

SGWidget ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ for SG - RI ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ renderers

detailed description

list of all including inherited members

implementation details

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)

instance member functions

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;

Detailed Description

SGRRendererWidget contains a SG - RI ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ renderer so that it can be used in the SGWidget ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ system.

Implementation Details

SG - RI ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ internally uses QRhi.

SGRRendererWidget(SGWWidget* parent, float x1, float x0, float y1, float y0, float w1, float w0, float h1, float h0, SGRBaseRenderer* renderControl, SGRBaseSyncer* syncControl);

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.

void updateCustomRenderer() const;

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)

contact 05524F / report a bug / make a suggestion

about 05524F SINGAPORE values

list of 05524F projects