If you have an sf::Texture that you want to display as a background of the child window, then you can use the setBackgroundTexture function.
Otherwise you have to create a Canvas widget inside the child window. The Canvas class is a wrapper around sf::RenderTexture, so you use it in the same way.
Otherwise you have to create a Canvas widget inside the child window. The Canvas class is a wrapper around sf::RenderTexture, so you use it in the same way.
Code Select
tgui::Canvas::Ptr canvas(*child);
canvas->setSize(child->getSize().x, child->getSize().y);
// This code is executed every time the sprite/texture changes.
// Either once when the sprite is a static image, or every frame when constantly changing the image.
canvas->clear();
canvas->draw(sprite);
canvas->display();