PDA

View Full Version : change the value in real time from to form



vanduongbk
24th July 2013, 08:26
hi everyone,
i have created many form as setup form ,people form ,mainform .... and all form as setup ,people ... are child form of mainform
in setup form,i creat instance as spinbox ,
i want to do when change a spinbox value in setup form->this value was updated at mainform in the real time because i want to use this spinbox value to comparator value in mainform
plz help me

anda_skoa
24th July 2013, 09:16
Simply add a signal that matches valueChanged() of QSlider to the class containing the slider and connect the slider's signal to the new signal.

That way it will be emitted whenever the slider emits its signal and you can connect to it from outside the form class.

Cheers,
_

vanduongbk
24th July 2013, 10:14
thank you ,my problem is solved
but i have a problem in this project
i have creat a database sqlite and record data to sqlite in mainform , and people form is still a child form in mainform
in people form , I have creat qtablewidget ,how i can display sqlite database on this people ' qtablewidget

anda_skoa
24th July 2013, 13:47
Using a QSqlTableModel or a QSqlQueryModel in the people form with the same database connection?

Cheers,
_