Reputation: 33
I Have a question about c++ and graphical user interface.
I'm working for a company and I've implemented a c++ code contaning 6-7 different .cpp file. They all contains only basic c++ stuff (pointers,vectors strings etc.)(It does not required any database access or something like that, I only read a file and make some analysis on it). Finally I almost come to end of my project but today my boss said to me that I need to create a simple GUI for my project which I never did before by c++.Therefore, through a couple hours, I've search on the web and I decided to use qt for creating required GUI. Now here is my question, to do that Do I have to write my all codes from the beginning or could I integrate my code into QT ?
Upvotes: 0
Views: 480
Reputation: 9216
You will need some interfacing/conversion/adaption between standard types and Qt types. But in general you should be able to integrate your existing code into a Qt application.
It will be easier to integrate the existing code into a Qt project than integrating Qt code into your existing project.
Which compiler do you use? You should stick to a compiler that is supported by Qt by a pre-built package.
Upvotes: 0
Reputation: 3095
Qt integrates well with existing C++ code, even with STL containers and streams. You probably have to change your build system a little bit, because of some tools (MOC
= Meta Object Compiler) you need to compile Qt classes. But this isn't usually a huge problem, because this special QObject
classes are only used for the GUI part of your application.
Upvotes: 1