I already wrote a program in C ++, and I would like to write a graphical interface for it. I understand that Qt is a great tool, but Qt has its own classes that confuse me. for example: instead of String, Qt has a class called QString ..
I am wondering if I can mix C ++ code and Qt code in C ++?
Yes, you can easily mix Qt and STL.
The graphical interface takes QString, but silently creates these forms std::stringor char*, QStringsreturned from the Qt, they can be converted using toStdString()or toAscii().
QString
std::string
char*
QStrings
toStdString()
toAscii()
Qt , .
Qt ++, "" , , .
edit: thanks bill
std ++ Qt .
, ++ , Qt-, . MVC/MVP , .
, / .
, , ! , QString toAscii(), Qt . , Qt ( , ), ++ Qt- ( ++)
! Qt - , ++. Qt , Socket, Containers, Network,... STL , Qt. , Qt , -, . , , , Qt , , Windows, Linux Mac OS, .
.
++ , STL . , ex-Trolltech , STL, Qt. Qt QTL, QtAlgorithms QString.
, STL:
Personally, I like QString more than std :: string, it is easier to use and more powerful.
Yes, you can.
I really made a Qt-GUI wrapper for a set of C-based functions. There are no problems with Qt integration, only a low level of C (which is a memory leak ...).
See here: http://code.google.com/p/qhocr/