Unsolved Qt/C++ The influence of the mainwidon button, to the buttons in the second window.
-
Hello, i dont know how figure it out.
I have push button in my mainWindow, and few buttons in secDialog.
I want change button status in secDialog, when i click button in mainWindow.
When i click button in mainWindow, i want set for example visibilty buttons in secDialog.
Somebody can help me with my problem? -
@BarbarBarabasz said in Qt/C++ The influence of the mainwidon button, to the buttons in the second window.:
Somebody can help me with my problem?
Hi and welcome!
Use https://doc.qt.io/qt-5/signalsandslots.html -
hi bro its so easy
u first in secDialog create a slot/method for examle:clsass secDialog:.. { ... public: void setBtn(QString btnName,bool vis){ //... write a sloution to show or hide a button with btnName and vis }
so u create a object from seDalog in MainWindow and call method :
mainwindow()//constructor { * dlg=new secDialog(); } void btnClicked(){ dlg->setBtn("btnxxx",false); } }
good luck
-
Thanks homies!!
I will try this in home.
Thanks for the fast response :)