Hi.
In a previous thread I've asked for some doubts about the Qt plugin system. My needs are to realize a Qtopia/QtExtended-style embedded system.
I have a server application (derived from QApplication with GuiServer flag), with its main entry-point function.
Now I'm trying to understand how can I run third-party applications from my server. Is the plugin system the best solution or should I use QApplication instances with GuiClient flag?
In the second case, is this base layout correct?
{
// It inherits from QApplication with GuiServer flag.
}
{
// It inherits from QApplication with GuiClient flag.
}
int main(int argc, char **argv)
{
pkServer srv(argc, argv);
if (srv.startUp()) {
pkApplication client(argc, argv);
client.startUp() // The client app shows its widgets here.
// ...other clients here...
return pkServer::exec();
}
return pkServer::StartupFailure;
}
class pkServer : public QApplication
{
// It inherits from QApplication with GuiServer flag.
}
class pkApplication : public QApplication
{
// It inherits from QApplication with GuiClient flag.
}
int main(int argc, char **argv)
{
pkServer srv(argc, argv);
if (srv.startUp()) {
pkApplication client(argc, argv);
client.startUp() // The client app shows its widgets here.
// ...other clients here...
return pkServer::exec();
}
return pkServer::StartupFailure;
}
To copy to clipboard, switch view to plain text mode
Thanks for your answers!
Bookmarks