0
這裏是similar problem,但我無法從它得到答案。qt5.5不顯示系統托盤
我嘗試official example,看看下面的截圖(在鏡頭中,QT應用系統盤不存在)
如何使系統托盤中顯示?
,這裏是我的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)
我的Linux版本(桌面環境XFCE)
[email protected] ~/Pictures $ lsb_release -a
No LSB modules are available.
Distributor ID: LinuxMint
Description: Linux Mint 17.2 Rafaela
Release: 17.2
Codename: rafaela