c++ - qt5.5 doesn't show system tray -
here similar problem, can't answer it.
i try official example , see following screenshot(in shot, qt app system tray doesn't exist)
how make system tray show?
here cmakelists.txt
cmake_minimum_required(version 3.3) project(systray) set(cmake_cxx_flags "${cmake_cxx_flags} -std=c++11") set(cmake_include_current_dir on) set(cmake_automoc on) set(cmake_autorcc on) set(qt5widgets_dir /home/roroco/qt/5.5/gcc_64/lib/cmake/qt5widgets) set(qt5gui_dir /home/roroco/qt/5.5/gcc_64/lib/cmake/qt5gui) find_package(qt5widgets) add_executable(main main.cpp window.cpp systray.qrc) target_link_libraries(main qt5::widgets)
my linux version(desktop environment xfce)
roroco@roroco ~/pictures $ lsb_release -a no lsb modules available. distributor id: linuxmint description: linux mint 17.2 rafaela release: 17.2 codename: rafaela
i solution this
then under 'session & startup' created new autostart entry following command:
bash -c 'export dbus_session_bus_address="" && dropbox start -i'
so ugly solution make sure dbus_session_bus_address before launch qt app, hope can improve answer , tell me mechanism
Comments
Post a Comment