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是我的普通用户名)。