随笔分类 -  C++

上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 33 下一页
摘要:QDateTime lastUpdateTime = QDateTime::currentDateTime(); QString dateTimeStr = lastUpdateTime.toString("yyyy-MM-dd hh:mm:ss"); //QDateTime::fromString 阅读全文
posted @ 2020-11-04 21:31 西北逍遥 阅读(181) 评论(0) 推荐(0)
摘要:多个QDockWidget用程序控制自动切换 qDockWidgetParam->setVisible(true); qDockWidgetParam->raise(); 阅读全文
posted @ 2020-10-15 20:27 西北逍遥 阅读(281) 评论(0) 推荐(0)
摘要:查询的条件控件 //检索字段的返回值类型 QHBoxLayout* horizontalLayout_7 = new QHBoxLayout(); horizontalLayout_7->setSpacing(6); horizontalLayout_7->setObjectName(QString 阅读全文
posted @ 2020-10-13 18:28 西北逍遥 阅读(125) 评论(0) 推荐(0)
摘要:C++ STL函数对象 cfunctionobject2020101101.cpp //cfunctionobject2020101101.cpp #include <iostream> #include <list> #include <algorithm> #include <iterator> 阅读全文
posted @ 2020-10-11 20:56 西北逍遥 阅读(178) 评论(0) 推荐(0)
摘要:查询数据 //查询数据源 QSqlQuery searchDataSource(ESSystemConfig esSystemConfig,QString sqlParam) {//连接数据库 ESDatabaseCommon esDatabaseCommonObj1; QString databa 阅读全文
posted @ 2020-10-09 15:49 西北逍遥 阅读(220) 评论(0) 推荐(0)
摘要:自定义生成IFC globalID的函数 .h文件 #include <QChar> #include <cstdlib> #include <ctime> QString createGlobalID(); .cpp文件 QString createGlobalID() { QChar chars 阅读全文
posted @ 2020-10-07 11:22 西北逍遥 阅读(270) 评论(0) 推荐(0)
摘要:C++ STL advance 迭代器前进或者后退n个元素 #include <iterator> #include <iostream> #include <list> #include <algorithm> using namespace std; int main() { list<int> 阅读全文
posted @ 2020-10-04 21:04 西北逍遥 阅读(182) 评论(0) 推荐(0)
摘要:C++ STL emplace iterator container::emplace(const_iterator pos,args) ●在容器的iterator位置pos上安插新元素,以args为初值 ●返回新元素的位置 ●此操作会引起当前的iterator失效 ●始自C++11 ●提供者:ve 阅读全文
posted @ 2020-10-03 20:47 西北逍遥 阅读(252) 评论(0) 推荐(0)
摘要:多个QPushbutton绑定同一个槽函数,槽函数通过sender判断点击的按钮。 int i = 0; QString str("pushButton %1"); QPushButton* pushButton; for (i = 0; i<16; ++i) { pushButton = new 阅读全文
posted @ 2020-09-30 16:37 西北逍遥 阅读(1492) 评论(0) 推荐(0)
摘要:c++ stl list void drawPoint() { list<cv::Point>::iterator iter1 = list_p.begin(); for (;iter1 != list_p.end();++iter1) { cv::Point point_index = *iter 阅读全文
posted @ 2020-09-27 20:59 西北逍遥 阅读(122) 评论(0) 推荐(0)
摘要:QLineEdit /**************************************************************************** ** ** Copyright (C) 2016 The Qt Company Ltd. ** Contact: https 阅读全文
posted @ 2020-09-07 19:56 西北逍遥 阅读(237) 评论(0) 推荐(0)
摘要:传输图片 void MainWindow::sendData() { QByteArray Data; QBuffer buffer; buffer.open(QIODevice::ReadWrite); QDataStream out(&Data,QIODevice::ReadWrite); // 阅读全文
posted @ 2020-09-02 14:50 西北逍遥 阅读(255) 评论(0) 推荐(0)
摘要:代码来源于网络,侵权联系删除 #include <iostream> using namespace std; #include <sstream> #include <iostream> #include <fstream> #include <algorithm> #include<string 阅读全文
posted @ 2020-07-31 23:47 西北逍遥 阅读(1488) 评论(0) 推荐(0)
摘要:代码来源于网络,侵权联系删除 #include <ros/ros.h> #include <image_transport/image_transport.h> #include <opencv2/highgui/highgui.hpp> #include <cv_bridge/cv_bridge. 阅读全文
posted @ 2020-07-31 23:45 西北逍遥 阅读(566) 评论(0) 推荐(0)
摘要:QDockWidget设置为tab切换形式的,其实就是调用一下 void QMainWindow::tabifyDockWidget(QDockWidget *first, QDockWidget *second)的此方法即可实现。 /******************************** 阅读全文
posted @ 2020-07-06 12:45 西北逍遥 阅读(2056) 评论(0) 推荐(0)
摘要:bzip2:一个完全免费,免费专利和高质量的数据压缩 doboz:能够快速解压缩的压缩库 PhysicsFS:对各种归档提供抽象访问的库,主要用于视频游戏,设计灵感部分来自于Quake3的文件子系统。 KArchive:用于创建,读写和操作文件档案(例如zip和 tar)的库,它通过QIODevic 阅读全文
posted @ 2020-04-13 13:12 西北逍遥 阅读(2107) 评论(0) 推荐(0)
摘要:C++ 查找容器中两个连续且相等的数 algostuff.hpp adjacent_find1.cpp vec1: 1 3 3 6 4 4 4 7 5 5 1first two elements with equal value have position 2first two elements w 阅读全文
posted @ 2020-01-05 17:31 西北逍遥 阅读(496) 评论(0) 推荐(0)
摘要:C++查找某个范围内的素数——最基本的方法 prime_number.cpp 235 711 13 1719 23 29 3137 41 43 47 5359 61 67 71 73 7983 89 97 101 103 107 109113 127 131 137 139 149 151 1571 阅读全文
posted @ 2020-01-03 14:45 西北逍遥 阅读(4369) 评论(0) 推荐(0)
摘要:C++ 查找第一个匹配元素(Search First Matching Element) algostuff.hpp search_element.cpp list: 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 94 5 6 7 8 9 1 2 3 4请按任意键继续. . . 阅读全文
posted @ 2020-01-03 09:17 西北逍遥 阅读(279) 评论(0) 推荐(0)
摘要:C++ minmax_element 最大值 最小值 algostuff.hpp minmax1.cpp 2 3 4 5 6 -3 -2 -1 0 1 2 3 4 5 6min element: -3max element: 6min: -3max: 6distance: 9minimum of a 阅读全文
posted @ 2020-01-02 20:37 西北逍遥 阅读(1525) 评论(0) 推荐(0)

上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 33 下一页