Skip to content
  • 0 Votes
    3 Posts
    1k Views
    F

    I found the problem.

    The problem is that I update labels in show_gaze_information.

    This function is a callback that is called when a message is published on the topic.

    To correct the code, in function show_gaze_information, the message should be stored in a variable. Nothing should be modified in UI.

    Then in main body of code, I added this part:

    # update gaze infor periodically timer_gaze = QtCore.QTimer() timer_gaze.timeout.connect(update_gaze_information) timer_gaze.setInterval(500) timer_gaze.start()

    This code periodically calls update_gaze_information every 0.5 seconds. Now, in this function, I update labels in the UI.

  • 0 Votes
    2 Posts
    722 Views
    C

    @aliemrenebiler said in Run a terminal command with a button click:

    QProcess is not working, the program never opens and says as output "QProcess: Destroyed while process ("...") is still running.".

    The problem would appear to be that your QProcess object goes out of scope (is destroyed) while the process you asked it to launch is still running i.e. exactly what the error message says. This is most likely because you have create the QProcess on the stack in the slot handling your button click, but it could be because it is parented to another QObject that is destroyed.

    We can only guess without seeing your code.

  • 0 Votes
    3 Posts
    727 Views
    N

    I'm running MacOS Mojave 10.14.5 and have Xcode 10.2 installed.
    The reason for the above error is due to the configure option -c++std c++11. Removing that constraint allowed the build to progress. I got two further build errors:

    In qtcanvas3d, which I was able to circumvent by skipping the module. In qtvirtualkeyboard, the hunspell include path incorrectly includes the hunspell subfolder since the header file refers to `hunspell/hunspell.h'. I hacked this by creating a subfolder and a symlink back to the header file in its original location.
    (See error details below.)

    With these workarounds, I was able to get a successful make using the following configuration: ../configure -qtlibinfix 5.14.1G -qtlibinfix-plugins -opensource -debug-and-release -developer-build -framework -pkg-config -nomake tests -skip qtandroidextras -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebglplugin -skip qtwebview -skip qtwinextras -skip qtx11extras -skip qtcanvas3d

    Expecting make install to install into the default -prefix location, I was disappointed to find that /usr/local did not contain any new Qt folders; neither Qt-5.14.1 nor Qt-5.14.1G were there, nor were there any other new folders there that might have come from the build. I'll need to debug this issue, but since I haven't used qmake before, I'll need to get familair with its way of doing things first, including understanding .pro files.

    I am pleased to see that the significant outputs from my build are all marked with the suffix I asked for in the -qtlibinfix 5.14.1G -qtlibinfix-plugins configuration options. Hopefully this will make it easier to debug the qt_gui_cpp package in ROS Kinetic. What is nice is that the header I am having difficulties with in the ROS build compiled correctly in my Qt build. Thus I can be sure that until ROS builds, the error is in ROS not Qt.

    Error (1) qtcanvas3d:

    /Users/user/Programming/Qt/qt5/build/qtbase/bin/moc -DQT_NO_LINKED_LIST -DQT_NO_FOREACH -DQTCANVAS3D_LIBRARY -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_PLUGIN -DQT_OPENGLEXTENSIONS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QMLMODELS_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB --include /Users/user/Programming/Qt/qt5/build/qtcanvas3d/src/imports/qtcanvas3d/.moc/debug/moc_predefs.h -I/Users/user/Programming/Qt/qt5/qtbase/mkspecs/macx-clang -I/Users/user/Programming/Qt/qt5/qtcanvas3d/src/imports/qtcanvas3d -I/Users/user/Programming/Qt/qt5/build/qtbase/include -I/Users/user/Programming/Qt/qt5/build/qtbase/include/QtOpenGLExtensions -I/Users/user/Programming/Qt/qt5/build/qtbase/include/QtQuick -I/Users/user/Programming/Qt/qt5/build/qtbase/include/QtGui -I/Users/user/Programming/Qt/qt5/build/qtbase/include/QtQmlModels -I/Users/user/Programming/Qt/qt5/build/qtbase/include/QtQml/5.14.1 -I/Users/user/Programming/Qt/qt5/build/qtbase/include/QtQml/5.14.1/QtQml -I/Users/user/Programming/Qt/qt5/build/qtbase/include/QtQml -I/Users/user/Programming/Qt/qt5/build/qtbase/include/QtNetwork -I/Users/user/Programming/Qt/qt5/build/qtbase/include/QtCore/5.14.1 -I/Users/user/Programming/Qt/qt5/build/qtbase/include/QtCore/5.14.1/QtCore -I/Users/user/Programming/Qt/qt5/build/qtbase/include/QtCore -I. -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1 -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/10.0.1/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include -F/Users/user/Programming/Qt/qt5/build/qtbase/lib -Muri=QtCanvas3D /Users/user/Programming/Qt/qt5/qtcanvas3d/src/imports/qtcanvas3d/glstatestore_p.h -o .moc/debug/moc_glstatestore_p.cpp /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -c -pipe -stdlib=libc++ -g -std=c++1y -fapplication-extension -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -mmacosx-version-min=10.13 -fvisibility=hidden -fvisibility-inlines-hidden -fno-exceptions -Wall -Wextra -Winconsistent-missing-override -Wobjc-interface-ivars -Wobjc-method-access -Wobjc-multiple-method-names -Werror=unguarded-availability -Werror=unguarded-availability-new -Werror=unsupported-availability-guard -fPIC -DQT_NO_LINKED_LIST -DQT_NO_FOREACH -DQTCANVAS3D_LIBRARY -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_PLUGIN -DQT_OPENGLEXTENSIONS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QMLMODELS_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I/Users/user/Programming/Qt/qt5/qtcanvas3d/src/imports/qtcanvas3d -I. -I/Users/user/Programming/Qt/qt5/build/qtbase/include -I/Users/user/Programming/Qt/qt5/build/qtbase/include/QtOpenGLExtensions -I/Users/user/Programming/Qt/qt5/build/qtbase/include/QtQuick -I/Users/user/Programming/Qt/qt5/build/qtbase/include/QtGui -I/Users/user/Programming/Qt/qt5/build/qtbase/include/QtQmlModels -I/Users/user/Programming/Qt/qt5/build/qtbase/include/QtQml/5.14.1 -I/Users/user/Programming/Qt/qt5/build/qtbase/include/QtQml/5.14.1/QtQml -I/Users/user/Programming/Qt/qt5/build/qtbase/include/QtQml -I/Users/user/Programming/Qt/qt5/build/qtbase/include/QtNetwork -I/Users/user/Programming/Qt/qt5/build/qtbase/include/QtCore/5.14.1 -I/Users/user/Programming/Qt/qt5/build/qtbase/include/QtCore/5.14.1/QtCore -I/Users/user/Programming/Qt/qt5/build/qtbase/include/QtCore -I.moc/debug -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/OpenGL.framework/Headers -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/AGL.framework/Headers -I/Users/user/Programming/Qt/qt5/qtbase/mkspecs/macx-clang -F/Users/user/Programming/Qt/qt5/build/qtbase/lib -o .obj/debug/moc_glstatestore_p.o .moc/debug/moc_glstatestore_p.cpp rm -f libqtcanvas3d_debug.dylib /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -stdlib=libc++ -headerpad_max_install_names -fapplication-extension -arch x86_64 -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -mmacosx-version-min=10.13 -Wl,-rpath,@executable_path/../Frameworks -Wl,-rpath,/Users/user/Programming/Qt/qt5/build/qtbase/lib -single_module -dynamiclib -o libqtcanvas3d_debug.dylib .obj/debug/arrayutils.o .obj/debug/qcanvas3d_plugin.o .obj/debug/enumtostringmap.o .obj/debug/abstractobject3d.o .obj/debug/canvas3d.o .obj/debug/buffer3d.o .obj/debug/canvasrendernode.o .obj/debug/context3d.o .obj/debug/contextattributes.o .obj/debug/framebuffer3d.o .obj/debug/program3d.o .obj/debug/renderbuffer3d.o .obj/debug/shader3d.o .obj/debug/shaderprecisionformat.o .obj/debug/teximage3d.o .obj/debug/texture3d.o .obj/debug/uniformlocation.o .obj/debug/activeinfo3d.o .obj/debug/canvasglstatedump.o .obj/debug/compressedtextures3tc.o .obj/debug/compressedtexturepvrtc.o .obj/debug/glcommandqueue.o .obj/debug/renderjob.o .obj/debug/canvasrenderer.o .obj/debug/canvastextureprovider.o .obj/debug/glstatestore.o .obj/debug/openglversionchecker.o .obj/debug/moc_qcanvas3d_plugin.o .obj/debug/moc_abstractobject3d_p.o .obj/debug/moc_canvas3d_p.o .obj/debug/moc_buffer3d_p.o .obj/debug/moc_canvasrendernode_p.o .obj/debug/moc_context3d_p.o .obj/debug/moc_contextattributes_p.o .obj/debug/moc_framebuffer3d_p.o .obj/debug/moc_program3d_p.o .obj/debug/moc_renderbuffer3d_p.o .obj/debug/moc_shader3d_p.o .obj/debug/moc_shaderprecisionformat_p.o .obj/debug/moc_teximage3d_p.o .obj/debug/moc_texture3d_p.o .obj/debug/moc_uniformlocation_p.o .obj/debug/moc_activeinfo3d_p.o .obj/debug/moc_canvasglstatedump_p.o .obj/debug/moc_compressedtextures3tc_p.o .obj/debug/moc_compressedtexturepvrtc_p.o .obj/debug/moc_glcommandqueue_p.o .obj/debug/moc_canvasrenderer_p.o .obj/debug/moc_canvastextureprovider_p.o .obj/debug/moc_glstatestore_p.o -F/Users/user/Programming/Qt/qt5/build/qtbase/lib /Users/user/Programming/Qt/qt5/build/qtbase/lib/libQt5OpenGLExtensions5.14.1G_debug.a -framework QtQuick5.14.1G -framework QtGui5.14.1G -framework AppKit -framework Metal -framework QtQmlModels5.14.1G -framework QtQml5.14.1G -framework QtNetwork5.14.1G -framework QtCore5.14.1G -framework DiskArbitration -framework IOKit -framework OpenGL -framework AGL Undefined symbols for architecture x86_64: "QtCanvas3D::CanvasUniformLocation::staticMetaObject", referenced from: int qmlRegisterUncreatableType<QtCanvas3D::CanvasUniformLocation>(char const*, int, int, char const*, QString const&) in qcanvas3d_plugin.o QtPrivate::MetaObjectForType<QtCanvas3D::CanvasUniformLocation*, void>::value() in qcanvas3d_plugin.o "vtable for QtCanvas3D::CanvasUniformLocation", referenced from: QtCanvas3D::CanvasUniformLocation::CanvasUniformLocation(QtCanvas3D::CanvasGlCommandQueue*, QObject*) in uniformlocation.o QtCanvas3D::CanvasUniformLocation::~CanvasUniformLocation() in uniformlocation.o NOTE: a missing vtable usually means the first non-inline virtual member function has no definition. ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make[5]: *** [/Users/user/Programming/Qt/qt5/build/qtbase/qml/QtCanvas3D/libqtcanvas3d_debug.dylib] Error 1 make[4]: *** [debug-all] Error 2 make[3]: *** [sub-qtcanvas3d-make_first] Error 2 make[2]: *** [sub-imports-make_first-ordered] Error 2 make[1]: *** [sub-src-make_first] Error 2 make: *** [module-qtcanvas3d-make_first] Error 2

    Error (2) qtvirtualkeyboard:

    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -c -include.pch/debug/QtHunspellInputMethod5.14.1G_debug_x86_64.pch/c++_x86_64 -pipe -stdlib=libc++ -g -std=c++1y -fapplication-extension -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -mmacosx-version-min=10.13 -fvisibility=hidden -fvisibility-inlines-hidden -fno-exceptions -Wall -Wextra -Winconsistent-missing-override -Wobjc-interface-ivars -Wobjc-method-access -Wobjc-multiple-method-names -Werror=unguarded-availability -Werror=unguarded-availability-new -Werror=unsupported-availability-guard -fPIC -DQT_NO_LINKED_LIST -DQT_NO_FOREACH -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_LINKED_LIST -DQHUNSPELLINPUTMETHOD_LIBRARY -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_FROM_BYTEARRAY -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_BUILD_HUNSPELLINPUTMETHOD_LIB -DQT_BUILDING_QT -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQT_DEPRECATED_WARNINGS_SINCE=0x060000 -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_VIRTUALKEYBOARD_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QMLMODELS_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I/Users/user/Programming/Qt/qt5/qtvirtualkeyboard/src/plugins/hunspell/hunspellinputmethod -I. -I/Users/user/Programming/Qt/qt5/build/qtbase/include -I/Users/user/Programming/Qt/qt5/build/qtbase/include/QtHunspellInputMethod -I/Users/user/Programming/Qt/qt5/build/qtbase/include/QtHunspellInputMethod/5.14.1 -I/Users/user/Programming/Qt/qt5/build/qtbase/include/QtHunspellInputMethod/5.14.1/QtHunspellInputMethod -I/usr/local/Cellar/hunspell/1.6.2/include/hunspell -I/Users/user/Programming/Qt/qt5/build/qtbase/include/QtVirtualKeyboard/5.14.1 -I/Users/user/Programming/Qt/qt5/build/qtbase/include/QtVirtualKeyboard/5.14.1/QtVirtualKeyboard -I/Users/user/Programming/Qt/qt5/build/qtbase/include/QtGui/5.14.1 -I/Users/user/Programming/Qt/qt5/build/qtbase/include/QtGui/5.14.1/QtGui -I/Users/user/Programming/Qt/qt5/build/qtbase/include/QtVirtualKeyboard -I/Users/user/Programming/Qt/qt5/build/qtbase/include/QtQuick -I/Users/user/Programming/Qt/qt5/build/qtbase/include/QtGui -I/Users/user/Programming/Qt/qt5/build/qtbase/include/QtCore/5.14.1 -I/Users/user/Programming/Qt/qt5/build/qtbase/include/QtCore/5.14.1/QtCore -I/Users/user/Programming/Qt/qt5/build/qtbase/include/QtQmlModels -I/Users/user/Programming/Qt/qt5/build/qtbase/include/QtQml -I/Users/user/Programming/Qt/qt5/build/qtbase/include/QtNetwork -I/Users/user/Programming/Qt/qt5/build/qtbase/include/QtCore -I.moc/debug -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/OpenGL.framework/Headers -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/AGL.framework/Headers -I/Users/user/Programming/Qt/qt5/qtbase/mkspecs/macx-clang -F/Users/user/Programming/Qt/qt5/build/qtbase/lib -o .obj/debug/hunspellinputmethod.o /Users/user/Programming/Qt/qt5/qtvirtualkeyboard/src/plugins/hunspell/hunspellinputmethod/hunspellinputmethod.cpp In file included from /Users/user/Programming/Qt/qt5/qtvirtualkeyboard/src/plugins/hunspell/hunspellinputmethod/hunspellinputmethod.cpp:30: In file included from /Users/user/Programming/Qt/qt5/build/qtbase/include/QtHunspellInputMethod/5.14.1/QtHunspellInputMethod/private/hunspellinputmethod_p_p.h:1: In file included from /Users/user/Programming/Qt/qt5/build/qtbase/include/QtHunspellInputMethod/5.14.1/QtHunspellInputMethod/private/../../../../../../../qtvirtualkeyboard/src/plugins/hunspell/hunspellinputmethod/hunspellinputmethod_p_p.h:45: In file included from /Users/user/Programming/Qt/qt5/build/qtbase/include/QtHunspellInputMethod/5.14.1/QtHunspellInputMethod/private/hunspellworker_p.h:1: /Users/user/Programming/Qt/qt5/build/qtbase/include/QtHunspellInputMethod/5.14.1/QtHunspellInputMethod/private/../../../../../../../qtvirtualkeyboard/src/plugins/hunspell/hunspellinputmethod/hunspellworker_p.h:51:10: fatal error: 'hunspell/hunspell.h' file not found #include <hunspell/hunspell.h> ^~~~~~~~~~~~~~~~~~~~~ 1 error generated. make[6]: *** [.obj/debug/hunspellinputmethod.o] Error 1 make[5]: *** [debug-all] Error 2 make[4]: *** [sub-hunspellinputmethod-make_first] Error 2 make[3]: *** [sub-hunspell-make_first] Error 2 make[2]: *** [sub-plugins-make_first] Error 2 make[1]: *** [sub-src-make_first] Error 2 make: *** [module-qtvirtualkeyboard-make_first] Error 2
  • 0 Votes
    3 Posts
    2k Views
    W

    Thanks !

    Yes, i have some stuff that doesnt quite need to be there, but it doesnt hurt. I removed all possible linkings and made them "hardcoded". If i add blackflycam.cpp to the sources, therefore it is compiled, i get those errors. If i dont, all runs smooth. The thing is, the code that i replaced with that file, has the exact same includes and non of them are qt-related, so i dont know what the hell is going on here !