Thanks Wyosta.
In reply to your questions:
- tagCloudDisplay is a member variable.
- Details are as follows
Class 1 : MyApplication
void MyApplication::createTagWindow()
{
TagWindowWidget* tagWindow = new TagWindowWidget; // This class inherits from a customised class which in turn inherits from QObject
Ui::TagCloud ui_TagCloud; // This is the ui attached
ui_tagCloud.setupUi(tagWindow );
}
void MyApplication::createTagWindow()
{
TagWindowWidget* tagWindow = new TagWindowWidget; // This class inherits from a customised class which in turn inherits from QObject
Ui::TagCloud ui_TagCloud; // This is the ui attached
ui_tagCloud.setupUi(tagWindow );
}
To copy to clipboard, switch view to plain text mode
Class 2: WordsManager (inherits directly from QObject)
{
WordsDisplay *wordsDisplayWindow = new WordsDisplay(tagCloud, wordList)
}
void WordsManager::loadWordWindow( QWidget *tagCloud, QListWidget *wordList)
{
WordsDisplay *wordsDisplayWindow = new WordsDisplay(tagCloud, wordList)
}
To copy to clipboard, switch view to plain text mode
The WordsDisplay class structure is as follows:
class WordsDisplay
: public QObject{
Q_OBJECT
protected:
:
:
}
class WordsDisplay : public QObject
{
Q_OBJECT
protected:
QWidget* tagCloudDisplay;
QListWidget* wordListDisplay;
:
:
}
To copy to clipboard, switch view to plain text mode
- I am trying to associate the 'scrollArea' in the ui to the tagCloudDisplay. Would this be the solution?
- How can I do this with the structure I have? As I am not able to retrieve the ui.scrollArea after the tagCloudDisplay is instantiated
Bookmarks