Qt是可能出現一下警告,不過可以忽略,程序照樣可以運行,這並不是錯誤。
1、QGtkStyle was unable to detect the current GTK+ theme.
2、Qt: Session management error: None of the authentication protocols specified are supported
折騰了好久,終於找到答案了。
第一個警告解決:gedit /etc/X11/xinit/.xinitrc,添加一行export GTK2_RC_FILES="$HOME/.gtkrc-2.0"
第二個警告解決:在使用root登錄是就會出現這種問題,切換成普通用戶及可。由於在ubuntu下本人習慣使用命令su切換到root下打開qtcreator編程,所以出現以上問題,於是使用命令 su chen切換回普通用戶(chen是我的普通用戶名)。