I\'m trying to modify my main layout from another thread. But the function run() is never called and i\'m having the error:
QObject::setParent: Cannot
In Qt you should never attempt to directly update the GUI from outside of the GUI thread.
Instead, have your threads emit signals and connect them to slots which do the necessary updating from within the GUI thread.
See the Qt documentation regarding Threads and QObjects.