Home > Mobile >  Qt how to access the dynamic creation of the window.
Qt how to access the dynamic creation of the window.

Time:03-29

Good big! The question now is such,

QToolButton * clickedButton=qobject_cast & lt; QToolButton * & gt; (sender ());
.
ChatWidget=new Widget.
ChatWidget - & gt; SetObjectName (IPandPort);
ChatWidget - & gt; SetWindowTitle (clickedButton - & gt; The text ());
ChatWidget - & gt; SetWindowIcon (clickedButton - & gt; Icon ());
ChatWidget - & gt; Show ();

The above for dynamically created window, click the button, create a window, each window different names, need access to the window?

CodePudding user response:

Access to the Internet to find myself a lot of, but is the child controls in the window, and couldn't find if access to the window

CodePudding user response:

Endures QList or QMap maintained in a list
  •  Tags:  
  • Qt
  • Related