Hi folks,

i have a problem regarding Qspinbox in combination with checkbox.. this is an example of my form :



so as u see i want to click on the checkbox and chose a number which is smaller or equal to something in qspinbox .. on clicking the ok button, my code list only the items with a value or smaller than the chosen number in qspinbox on screen.. i dont know how to compare the value in qspinbox with the value of the items on my screen in my code i do it like this but it doesnt work:

Qt Code:
  1. int x = 50;
  2.  
  3. optionsDlg dlg(this);
  4.  
  5. QListViewItemIterator it (this);
  6. while (it.current())
  7. {
  8. if (!it.current()->parent())
  9. {
  10. SomethingItem *somethingItem = (SomethingItem*) it.current();
  11. QString itemName = it.current()->text (Col_Item_Names);
  12.  
  13. if (somethingItem->getCol_Val() > x )
  14. {
  15. if (dlg.check_item_smaller && dlg.itemBox1)
  16.  
  17. {
  18. dlg.check_item_smaller->setChecked(true);
  19. somethingItem->setVisible(false);
  20. }
  21. else
  22. somethingItem->setVisible(false);
  23. }
  24.  
  25. else if (somethingItem->getCol_Val() < x)
  26. {
  27.  
  28. if(dlg.check_item_greater && dlg.itemBox2)
  29. {
  30.  
  31. dlg.check_item_greater->setChecked(true);
  32. somethingItem->setVisible(true);
  33. }
  34. else
  35. somethingItem->setVisible(false);
  36. }
  37. }
  38. it++;
  39. }
To copy to clipboard, switch view to plain text mode 

with getCol_Val() it compare if the numbers in col are smaller than 50 then show the items. but i want to do this with that QspinBox in the form. i want to chose a number is qspinbox and then comapre with getCol_Val()..

can someone look at the code?
thanks in advance