I created QListWIdget in one class, wand to add item to that list widget from another class.

class TestScriptGeneratorDialog - QListWidget *m_scriptWidget;

Class PresskeyDialog -

pTest = new TestScriptGeneratorDialog;
pTest->m_scriptWidget->addItem("sdss");

Add item is not working. HOw can we do it.