Qt Code:
int a = cmb->currentIndex () + 1;To copy to clipboard, switch view to plain text mode
Qt Code:
int a = cmb->currentIndex () + 1;To copy to clipboard, switch view to plain text mode
a life without programming is like an empty bottle![]()
tpf80 (16th May 2007)
hey there where do i stick that code? do i put it in a seperate function as a slot or in the constructor of the QComboBox?
... Where would you use that int selection? Put the example piece of code there and replace cmb with the pointer to your combo box.
hey there i tried the currentIndex() function but it only works for the first item in the QComboBox and then gives the same output for the rest of the items as well. is there a way to distinguish between the itesm in the QCombobox so that they each give a different value for int selection, or call a seperate function each?
Use next signal
Qt Code:
To copy to clipboard, switch view to plain text mode
a life without programming is like an empty bottle![]()
Bookmarks