分类: 编程

23 篇文章

基于C++的C语言学习
malloc 关键字 这个一看就会 1.想要和C++一样申请一个结构体或者类的内存: DynamicArray_C *myArray = (DynamicArray_C*)malloc(sizeof(DynamicArray_C)); 2.申请一个数组: int *array = (int*)malloc(sizeof(int) * <元素个…
在 orangepi5plus 上编译 Qt
Qt 源码版本 6.5.2 环境:ubuntu jammy 可以用容器进行部署 安装环境 sudo apt install bison build-essential clang flex gperf \ libatspi2.0-dev libbluetooth-dev libclang-dev libcups2-dev libdrm-dev \ …
Qt OpenGL 学习笔记 – 3
006. GLSL 初步认识 in out fragment shader和 vertex shader的变量是可以对接的,比如: 在vertex shader里你定义了: out vec4 color1; 就代表你要输出一个vec4类型的变量,要在fragment shader中接收它你只需要: in vec4 color1; 但是要注意保持变量…
Qt OpenGL学习笔记 – 2
开头 废话不多说,该说的在学习笔记1中已经说明。这篇文章会继续简单认识OpenGL里的一些东西。之前的Demo没有编号,所以从这里开始小标题前面的编号也就对应github上面的project代码 github链接:https://github.com/OnlyCharSaMa/Qt-OpenGL-Demos/tree/main 001.编译链接着色…
QML Image 不平滑
也许你开启了图像的抗锯齿和平滑过后,图像的边缘还是不太顺滑,你可以设置mipmap这个属性让图像的边缘变得顺滑 比如这样: Image { id: bgImg anchors.fill: parent smooth: true antialiasing: true mipmap: true fillMode: Image.PreserveAspec…
QML中获取已经改变的值
Rectangle { width: 100 height: 100 property int myValue: 0 onMyValueChanged: { console.log("myValue changed from", PropertyChanges(myValue).from, "to", myValue) } MouseArea { …