Integrating Qt as debug tool for server app
-
Hello,
i am developping a service that runs on Xubuntu
but for debugging purpouses i need a quick/easy to integrate gui
i just installed QT5 but it seems (in netbeans) that i can only create Qt apps
i want to integrate a small Qt windo to my app(in debug/dev mode),
not the other way around...is it possible ?otherwise i'll have to consider another gui like gtk or whatever...
so far i added
[code]
#include <QtGui/QApplication>int main()
{
QApplication a(argc, argv);
Widget w;w.setName( "title" ); w.show(); return a.exec();
...
[/code]
to my project but i dont know what libs to inclue (-l...) in the linker
please help me out
thx
-
well fuck qt then
-
Firstly, this is a community resource. Members respond to posts when time and timezones permit, we are not sitting here waiting for your questions. It is not unreasonable to wait 24-48 hours for someone to respond if and only if they have something useful to contribute. Also, foul language, explicit or implied, is never acceptable, particularly if you still expect help.
</rant>
As to your question: due to the way in which Qt applications are complied/built (using a Meta Object Compiler (MOC)) it is generally easier, IMHO, to create a Qt project (i.e. a .pro file) and compile it via the qmake tool which will take care of the configuration and includes/libraries for you. The Qt documentation has lots of information on the compilation, build and distribution process. The easiest way of including Qt functionality into other applications, in my experience, is to build a shared library/DLL etc. with Qt which can be loaded and used from another application without further compilation. I'm guessing this will more effort than its worth in your situation unless the debug functionality is to be a permanent feature.
-
moderator hat on: Using foul language is not acceptable here. Please practice patience for getting replies on your queries. If you need immediate answers, get paid support from one of the many vendors offering that.
On your actual query: I think you're having a problem integrating event loops. I would not recommend trying to integrate a Qt UI into a service. Instead, I'd set up the design in a way that your service can communicate with an application via a simple protocol, and you keep the GUI as a separate process from the actual service. A local socket will do, but a network port just as well. DBUS may be good option for you as well.