QT: little improvements
fixed id assignment bug