I have a progress bar object (ui->QprogressBar) available in my mainwindow.cpp. But, I want to use this object in another class (readerfile.cpp).
Headers
mainwindow.h
demo.h
Sources
mainwindow.cpp
demo.cpp
I use this method to call object most of the time:- Using a function call, for example -mainwindow.cpp I will call this function
mainwindow->isFunction(ui->QprogressBar);
isFunction is available inside my demo.cpp file
void demo :: isfunction (QProgressBar *progress)
But, Now I want to use QprogressBar object directly inside my demo.cpp file. I tried all possible combinations, connections and just can't get it work. So could someone please explain me, how to access UI elements object from class demo.
Any idea for the solution will be a great help. Thanks.