Issue
My app is a basic list of QLineEdit where users enter values and click on "generate" to create a config file for a drone.
<widget class="QLineEdit" name="namespace">
<property name="text">
<string>Drone1</string>
</property>
</widget>
if I do :
self.namespace.text()
I receive the value of this field.
Now, we want to create one config file for many drones, so I used QTabWidget to create a tab for each drone in my qtapp and I just don't understand how to select a tab, extract all my values, pass to next tab, extract all values...
something like this :
for x in tabWidget.count():
do_something(tabWidget.tab[x].namespace.text())
#or
for tab in tabWidget:
do_something(tab.namespace.text())
I'm not an expert of Qt and I did not find a lot oh things on the web so I think I don't have the good reflexion on this problem. Thank you for your help
Solution
ok I found it, it's in the documentation and I did not see it
for x in self.tabWidget.count()
do_something(self.tabWidget.widget(x).namespace.text())
Answered By - q7frkz
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.