Quantcast
Channel: QtWebEngine
Viewing all articles
Browse latest Browse all 13965

Adding/Removing Qlineedit objects during runtime with dependency to QCombobox object

$
0
0
Hi all, I have a simple benchmark study: I have a mainwindow application. It only consists of a Qcombobox instance (with 3 items) and 3 Qlineedit instance within a vertical layout. My purpose is: When the user select 1st item of the combobox is selected(default behavior) , all 3qlineedit objects are visible but disabled. When the 2nd combobox item is selected, only the 1st qlineedit object would be visible and enabled (with preserving its position and size in the vertical layout), the last two qlineedit objects would disappear. When the 3rd combobox item is selected, the 1st & 2nd qlineedit object would be visible and enabled (with preserving their positions and sizes in the vertical layout), the 3rd qlineedit object would disappear. I’ve tried lots of options but encountered with run time errors. What kind of ways, classes or functions I should use? Or do you have any simple code similar to this subject? Isearched all the forum(s) but didn’t see any solution. Thanks in advance

Viewing all articles
Browse latest Browse all 13965

Trending Articles