Monday, May 14, 2012

Simple connection between an int and QComboBox?

Somehow I feel really silly to ask this question, but I just spent 2 hours reading this site and other sources of information, and I only find complicated solutions, while I strongly believe there must be a really simple one for my problem.



In TCL/TK for example, I can define a variable and bind it to a combobox in 2 lines of code. Similarly in Qt/C++, I have an int defined in one of my classes, and I want the QCombobox to set that int to the number (index) of the selected element.



Do I really have to delve in the depths of model/view and its classes to achieve this?





No comments:

Post a Comment