- 博客(7)
- 资源 (1)
- 收藏
- 关注
原创 C++类内线程运行需要注意的问题
如果仅将a或者t定义为类内的普通变量,而不声明为成员变量,编译不会报错,在某些环境和系统中也能够正常运行,但在某些系统和环境中可能会异常退出。如果要在类A内部将类的成员函数作为一个线程运行,首先要在类内声明一个线程的成员变量t,然后在其他成员函数中初始化该变量。如果在类B中运行一个类A的对象,也需要首先将该对象声明为类B的一个成员变量a,然后在对该变量进行调用。
2023-06-15 17:47:18
207
1
原创 Qt creator使用clang-format优化代码风格
下载clang-format:sudo apt-get install clang-format在Qt中的help->about plugins,勾选C+±>Beautifier,重启Qt.在Qt中的tools->Options-> Beautifier,配置clang-format.在Qt中的tools->Options-> Environment中,设置快捷键。上述操作完毕后,就可以使用clang-format一键优化代码格式了。示例..
2020-12-21 16:31:48
997
原创 ubuntu ros serial安装串口驱动与串口权限获取
1. ros serial安装串口驱动参考http://www.roswiki.com/read.php?tid=557&fid=39(1)通过sudo apt-get install ros-<ros版本,如kinetic>-serial下载ROS对应版本的工具包serial会安装在opt/ros/<ros版本,如kinetic>/share/serial目录下,重启终端,输入 roscd serial,可以检测到serial包的路径,说明serial包已经安装成功
2020-07-20 13:08:24
3995
原创 protobuf与qt冲突解决方案
It seems that this error is caused by the library libqgtk3.so located in /opt/Qt/5.9/gcc_64/plugins/platformthemes. If you don’t need it in your project you can rename/remove it to make the error go a...
2020-01-12 22:24:25
770
原创 ubuntu protobuf和QT冲突问题
解决方法:Protobuf version conflicts with QtIt seems that this error is caused by the library libqgtk3.so located in /opt/Qt/5.9/gcc_64/plugins/platformthemes. If you don’t need it in your project you ca...
2020-01-12 22:17:37
471
原创 ubuntu脚本开机自启动设置
1.在应用搜索中搜索“start application”2.打开该应用,点击Add3.选择脚本路径,拷贝到name中,点击Add4.重启电脑
2019-12-23 16:15:00
167
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅