All I have created a MainWindow Application Called "porcupine" This has a File menu where you *should* be able to open a QDialog (preferences.ui) file to set the application preferences.
I set the Signals and Slots to point to a Function:
void Porcupine::showPrefs()
{
qDebug("Open Prefs Window");
Preferences *prefs = new Preferences(this);
prefs.exec();
}
void Porcupine::showPrefs()
{
qDebug("Open Prefs Window");
Preferences *prefs = new Preferences(this);
prefs.exec();
}
To copy to clipboard, switch view to plain text mode
I get the following errors...
porcupine.cpp: In member function `void Porcupine::showPrefs()':
porcupine.cpp:257: error: no matching function for call to `Preferences::Preferences(Porcupine* const)'
preferences.h:18: note: candidates are: Preferences::Preferences(const Preferences&)
preferences.h:22: note: Preferences::Preferences()
porcupine.cpp:258: error: request for member `exec' in `prefs', which is of non-class type `Preferences*'
porcupine.cpp: In member function `void Porcupine::showPrefs()':
porcupine.cpp:257: error: no matching function for call to `Preferences::Preferences(Porcupine* const)'
preferences.h:18: note: candidates are: Preferences::Preferences(const Preferences&)
preferences.h:22: note: Preferences::Preferences()
porcupine.cpp:258: error: request for member `exec' in `prefs', which is of non-class type `Preferences*'
To copy to clipboard, switch view to plain text mode
I know this is a classing problem, but i keep getting all messed up dealing with the autocreated H files from designer...
Thanks...
Bookmarks