随笔分类 -  C++

上一页 1 2 3 4 5 6 7 ··· 33 下一页
摘要:#include <QMap>#include <QString>#include <iostream>int main() { QMap<QString, int> map; map["apple"] = 1; map["banana"] = 2; map["orange"] = 3; QStri 阅读全文
posted @ 2024-01-07 21:38 西北逍遥 阅读(508) 评论(0) 推荐(0)
摘要:QCheckBox* indexCheckBox = new QCheckBox(); connect(indexCheckbox,SIGNAL(stateChanged(int)),this,SLOT(slotStateChangedAction(int))); void slotStateCha 阅读全文
posted @ 2024-01-06 20:59 西北逍遥 阅读(16) 评论(0) 推荐(0)
摘要:Qt随机生成颜色 QColor #include <QColor> #include <QRandomGenerator> // 创建一个随机颜色 QColor randomColor() { QRandomGenerator generator; int r = generator.bounded 阅读全文
posted @ 2024-01-04 18:54 西北逍遥 阅读(520) 评论(0) 推荐(0)
摘要:#include <osg/Geode> #include <osgText/Text3D> int main() { // 创建场景图 osg::ref_ptr<osg::Group> root = new osg::Group(); osg::ref_ptr<osg::Geode> geode 阅读全文
posted @ 2024-01-02 21:40 西北逍遥 阅读(77) 评论(0) 推荐(0)
摘要:#include <osg/Node> #include <osgViewer/Viewer> #include <osgDB/ReadFile> #include <osg/ShapeDrawable> int main() { // 创建Box对象 osg::ref_ptr<osg::Box> 阅读全文
posted @ 2024-01-01 21:34 西北逍遥 阅读(73) 评论(0) 推荐(0)
摘要:osg添加光源 #include <osg/Light>#include <osg/LightSource>#include <osg/Node>#include <osg/Geode>#include <osgDB/ReadFile>#include <osgViewer/Viewer>int m 阅读全文
posted @ 2023-12-31 18:59 西北逍遥 阅读(137) 评论(0) 推荐(0)
摘要:#include <opencv2/opencv.hpp> #include <opencv2/highgui/highgui.hpp> #include <opencv2/imgproc/imgproc.hpp> #include <iostream> using namespace cv; us 阅读全文
posted @ 2023-12-30 21:11 西北逍遥 阅读(306) 评论(0) 推荐(0)
摘要:qt 15有新的库产生随机数了,再也不用担心在for循环中会获取重复的随机数了。 #include <QRandomGenerator> // ... for (int i = 0; i < 10; ++i) { QRandomGenerator generator; generator.seed( 阅读全文
posted @ 2023-12-29 16:43 西北逍遥 阅读(204) 评论(0) 推荐(0)
摘要:osg Node节点透明度 osg::ref_ptr<osg::StateSet> stateState = north_wall_geode->getOrCreateStateSet(); stateState->setMode(GL_BLEND, osg::StateAttribute::ON) 阅读全文
posted @ 2023-12-23 00:58 西北逍遥 阅读(70) 评论(0) 推荐(0)
摘要:QDomEntity Public Functions QDomEntity() QDomEntity(const QDomEntity &x) QDomNode::NodeType nodeType() const QString notationName() const QString publ 阅读全文
posted @ 2023-11-22 17:32 西北逍遥 阅读(16) 评论(0) 推荐(0)
摘要:QDomNode Public Functions QDomNode() QDomNode(const QDomNode &n) ~QDomNode() QDomNode appendChild(const QDomNode &newChild) QDomNamedNodeMap attribute 阅读全文
posted @ 2023-11-20 19:30 西北逍遥 阅读(96) 评论(0) 推荐(0)
摘要:QFileInfo #include <QFileInfo> Public Functions QFileInfo() QFileInfo(const QString &file) QFileInfo(const QFile &file) QFileInfo(const QDir &dir, con 阅读全文
posted @ 2023-11-18 19:03 西北逍遥 阅读(147) 评论(0) 推荐(0)
摘要:在C++中启动一个.bat文件,你可以使用标准库中的system函数。这个函数可以让你在C++程序中执行外部命令。 #include <cstdlib> int main() { // 在这里替换成你的.bat文件的路径 const char* batchFilePath = "C:\\Path\\ 阅读全文
posted @ 2023-09-27 11:11 西北逍遥 阅读(726) 评论(0) 推荐(0)
摘要:QSurface #include <QSurface> Public Types enum SurfaceClass { Window, Offscreen } enum SurfaceType { RasterSurface, OpenGLSurface, RasterGLSurface, Op 阅读全文
posted @ 2023-08-07 20:12 西北逍遥 阅读(194) 评论(0) 推荐(0)
摘要:QFuture #include <QFuture> Public Functions QFuture() QFuture(const QFuture<T> &other) ~QFuture() QFuture::const_iterator begin() const void cancel() 阅读全文
posted @ 2023-07-15 21:30 西北逍遥 阅读(301) 评论(0) 推荐(0)
摘要:QIODevice #include <QIODevice> Public Functions QIODevice() QIODevice(QObject *parent) virtual ~QIODevice() virtual bool atEnd() const virtual qint64 阅读全文
posted @ 2023-07-14 19:19 西北逍遥 阅读(109) 评论(0) 推荐(0)
摘要:QJsonObject #include <QJsonObject> Public Types class const_iterator class iterator typedef ConstIterator typedef Iterator typedef key_type typedef ma 阅读全文
posted @ 2023-07-13 19:59 西北逍遥 阅读(293) 评论(0) 推荐(0)
摘要:松灵机器人TRACER 串口操作命令 5AA50A55010201000000000062 //低八位转向左 5AA50A550102000000900000F1 //高八位向右 5AA50A5501020000A000000001 低八位向左 5AA50A550102000000A0000001 阅读全文
posted @ 2023-07-12 13:02 西北逍遥 阅读(58) 评论(0) 推荐(0)
摘要:QJSEngine #include <QJSEngine> Public Types enum Extension { TranslationExtension, ConsoleExtension, GarbageCollectionExtension, AllExtensions } flags 阅读全文
posted @ 2023-07-11 18:41 西北逍遥 阅读(166) 评论(0) 推荐(0)
摘要:QLibrary #include <QLibrary> Public Types enum LoadHint { ResolveAllSymbolsHint, ExportExternalSymbolsHint, LoadArchiveMemberHint, PreventUnloadHint, 阅读全文
posted @ 2023-07-03 21:51 西北逍遥 阅读(306) 评论(0) 推荐(0)

上一页 1 2 3 4 5 6 7 ··· 33 下一页