QTabletEvent has a pressure() method that you can use to control line thickness of whatever is appropriate for your app. If the tablet example at that link doesn't respond to the Surface pen, then I don't know if there will be an easy way to use it with Qt API's. You might have to look into directly getting native events and mucking around with Windows specific event handling code, which is a bit gross.