next up previous contents index
Next: QTable Up: Programming Previous: QPushButton   Contents   Index


QComboBox

QComboBoxes are inserted in Qt Designer. Your can insert the choices in the box within your code.

Figure 6.3: Inserting topics and clearing a ComboBox
pvQComboBox(p,ComboBox1,0,1,AtTop);
pvSetText(p,ComboBox1,"choice1");
pvSetText(p,ComboBox1,"choice2");
pvSetText(p,ComboBox1,"choice3");
pvSetText(p,ComboBox1,"choice4");
pvSetText(p,ComboBox1,"choice5");
pvSetText(p,ComboBox1,"choice6");
...
pvClear(p,ComboBox1);

Figure 6.4: This is the response to selecting a ComboBox item
case TEXT_EVENT:
  printf("TEXT_EVENT id=%d %s\n",i,text);
  break;



Rainer Lehrig 2004-02-17