KURL url("https://www.example.com"); url.setPath("/about");
KURL url("ftp://example.com/downloads"); url.setPath("/files/document.pdf");This code sets the path of the `url` object to "/files/document.pdf". These examples use the KURL class from the Qt framework.