Emoji support
-
@Vadi2 if your issue is solved, please don't forget to mark your post as such. Thanks.
-
@raven-worx
Have you implemented colored emojis properly in qt project in this way which you mentioned in this post?You did not mentioned when we get uint by combining high and low surrogate and it is emoticons, then how to render it in qt.
Thanks in advance for your response. -
@Sikander-Rafiq said in Emoji support:
Have you implemented colored emojis properly in qt project in this way which you mentioned in this post?
as written i used Twitter emoticon icons (PNGs), so yes they are colored.
You did not mentioned when we get uint by combining high and low surrogate and it is emoticons, then how to render it in qt.
As i mentioned use QTextObjectInterface. Following the same principle like in this example.
-
I have developed Emoticon widget in Qt C++. Please see https://youtu.be/QXDfhien_vM
-
-
@raven-worx said in Emoji support:
Here are some implementation hints:
@raven-worx I am trying to change your github project to build with CMake
https://github.com/raven-worx/qrwemoticons
I seems the steps you described above are not in this implementation, is that correct? Do you have any samples to share with those steps, or are they not really needed any more? Thanks
-
@Pedro-Vicente This is my Cmake script
cmake_minimum_required(VERSION 3.16) project(qrwemoticons VERSION 1.0.0 LANGUAGES CXX) set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_AUTOMOC ON) if(MSVC) set (CMAKE_PREFIX_PATH "C:\\qt_install") endif() find_package(Qt6 REQUIRED COMPONENTS Widgets) find_package(Qt6 REQUIRED COMPONENTS Svg) find_package(Qt6 REQUIRED COMPONENTS Xml) qt_standard_project_setup() add_definitions(-DQRWEMOTICONS_LIB) add_executable(qrwemoticons src/QrwEmoticons.cpp src/QrwEmoticons_p.cpp src/QrwEmoticons_data.cpp src/TextEdit.cpp src/QrwEmoticonsTextObjectInterface.cpp include/QrwEmoticons/Global.h include/QrwEmoticons/QrwEmoticonsPlugin.h include/QrwEmoticons/QrwEmoticons.h include/QrwEmoticons/TextEdit.h src/QrwEmoticons_p.h src/QrwEmoticonsTextObjectInterface_p.h example-app/src/MainWindow.cpp example-app/src/MainWindow.h example-app/main.cpp) include_directories(include) include_directories(example-app/src) target_link_libraries(qrwemoticons PRIVATE Qt6::Widgets) target_link_libraries(qrwemoticons PRIVATE Qt6::Svg) target_link_libraries(qrwemoticons PRIVATE Qt6::Xml) set_target_properties(qrwemoticons PROPERTIES WIN32_EXECUTABLE ON MACOSX_BUNDLE ON) #plugins #The json file must reside in one of the include directories specified by the build-system. moc exits #with an error when it could not find the specified file. include_directories(plugin-twitter) include_directories(shared/src) add_library(plugin-twitter SHARED shared/src/QrwEmoticonsHelper.cpp shared/src/QrwEmoticonsHelper.h plugin-twitter/src/plugin.cpp plugin-twitter/src/plugin.h) target_link_libraries(plugin-twitter PRIVATE Qt6::Widgets) target_link_libraries(plugin-twitter PRIVATE Qt6::Svg) target_link_libraries(plugin-twitter PRIVATE Qt6::Xml)
-
@Pedro-Vicente But using that script, gives a link error
mocs_compilation_Debug.obj : error LNK2001: unresolved external symbol "public: static struct QMetaObject const QrwEmoticons::staticMetaObject"