Search code examples
wt

WLink vs WAnchor / When to use which one


I'm a bit confused: Don't have WLink and WAnchor the same purpose? Is it just that WLink won't emit the internal Path Changed signal?!


Solution

  • Wt::WLink represents a URL.

    It's the location of a resource. It's information.

    Wt::WAnchor represents something you can click on in a web page.

    It's something visual - such as text or an image, combined with a WLink that is navigated to if you click on the WAnchor.