QRect rect(0, 0, 100, 100); // Creates a 100x100 rectangle at (0, 0) rect.setX(50); // Sets the x-coordinate of the top-left point to 50
QRect rect(0, 0, 100, 100); // Creates a 100x100 rectangle at (0, 0) int xPos = getUserInput(); // Gets the x-position input from the user rect.setX(xPos); // Sets the x-coordinate of the top-left point to the user input valuePackage library: Qt Core Library.