CMakeLists.txt:
project( test1 )
find_package( KDE4 REQUIRED )
include_directories( ${KDE4_INCLUDES} )
set( SRC test1.cpp )
kde4_automoc( ${SRC} )
kde4_add_executable( test1 ${SRC} )
target_link_libraries( test1 ${KDE4_KDEUI_LIBS} ${KDE4_KPARTS_LIBS} )
test1.cpp
#include <KDE/KCodecs>
#include <QtCore>
#include <iostream>
int main(int argc, char *argv) {
KMD5 context( "Hello, world" );
std::cout << "Digest output: " << context.hexDigest().data() << std::endl;
}
Very simple - but now I can start experimenting with the other kdelibs classes until I understand them well. Then I will be able to understand the rest of KDE better.
No comments:
Post a Comment