I gave this a go, but it does not work as expected yet. It does when I start my program locally, but when I try to start it remotely over ssh, I receive the error message:
qt.qpa.screen: QXcbConnection: Could not connect to display
Could not connect to any X display.
I was able to find hints that I should forward my X session, but this does not come easy to me, because I have to first ssh into a proxy server and then from there I can ssh into a protected machine. I would like to avoid any X and windows and widgets altogether. My main function looks like this:
#include "GuiSimulation.h"
#include "Experimenter.h"
#include <QApplication>
int main(int argc, char *argv[])
{
GuiSimulation w; // The gui.
Experimenter e; // The background thread.
if (argc > 1)
{
e.start();
}
else
{
w.show();
}
return a.exec();
}
#include "GuiSimulation.h"
#include "Experimenter.h"
#include <QApplication>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
GuiSimulation w; // The gui.
Experimenter e; // The background thread.
if (argc > 1)
{
e.start();
}
else
{
w.show();
}
return a.exec();
}
To copy to clipboard, switch view to plain text mode
Even if I minimize this to
#include <QApplication>
int main(int argc, char *argv[])
{
return a.exec();
}
#include <QApplication>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
return a.exec();
}
To copy to clipboard, switch view to plain text mode
I receive the error message above. Any help is much appreciated.
Bookmarks