see i have one c code , printf("hello world"); normally this c program will run by gcc in console. i lyk to develop gui for this code. that is hello world should be display in dialog box of qt.. for that what i want to do??
#include <QtGui/QApplication>
#include <QLabel>
int main(int argc, char *argv[])
{
label.show();
return a.exec();
}
#include <QtGui/QApplication>
#include <QLabel>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QLabel label("Hellow World");
label.show();
return a.exec();
}
To copy to clipboard, switch view to plain text mode
how to add C code(linux c) in qt?
Qt works on C++, as C++ has in-built support for C, just compile you C code as you would do in plain C++, nothing more is required.
what are the libraries should add?
Just include required C++ headers, no Qt files are required.
how to use the c code in qt like how to create object and how to synchronize?
What do you mean by object, C does not have objects's concept, also what do you mean by synchronize?
Bookmarks