Home > Mobile >  Combobox and tablewidget items
Combobox and tablewidget items

Time:11-01

How to put the combobox items and tablewidget correspondence, is when clicking the combobox items, tablewidget display only and the corresponding item (combobox) content, other are hidden

CodePudding user response:

In the combobox onIndexChanged:
1. Load the tablewidget emptied again
2. If it is similar to screen, baidu once, you will find that there is a personal write very good,
3. The custom can make a list or an array of records to hide the grid, then set a record has been hidden lattice, switch activates the corresponding grid show hidden line,

CodePudding user response:

ComboBox control, click on it then I can show you want the item, you also need to write slot function?

CodePudding user response:

For example, comboBox had ALL three items, T, F, now I click T, interface can appear T, you also need to write a slot function corresponding to the T?

CodePudding user response:

reference jpangpangzhu reply: 3/F
, for example, comboBox had ALL three items, T, F, now I click T, interface can appear T, you also need to write a slot function corresponding to the T?

No related function call click the combobox wouldn't have any reaction, interface is simply draw a piece of color,
If you order the T, tablewidget have can T to go only, regardless of how to achieve, anyway live have finished, also need to send this post?

Combobox switching signal will only, what function does not take the initiative to call, but if you find it not connect slotted function response, may indeed, automatically connect on_xxx_aaa () the corresponding slot function, specific can check it,
  •  Tags:  
  • Qt
  • Related