Hi guys, it's the first time that i program with QT5 and mysql database also. Before to ask help i will show you the small database that i have to use and the gui of my application:

DB: http://s33.postimg.org/qqht3dc6n/Table.png
GUI: http://s33.postimg.org/cjtc013hr/gui.jpg

1) How can i show in a TreeView/or Widget the category table (without the ID), and if the user click on the plus to expand each parent the child will be the subcategory table (also without ID)?
2) Is it possible for example to retrieve the categoryID when the user click on one element in the tree? I will use the id to run query and display the proper data in the table.

I just want to say that the tree and the table will be read-only, to update or add something in the database i will select a row in the table and press a button to add, remove or update.

I hope someone could help me, it's 3 days that i'm stuck with this, and i didn't find any useful information for the qt website or google.