What you want to do is use editors for items in QTableWidget. I would highly recommend you to use QItemEditorFactory. There are default editors available and also you can create and use your own.