- 博客(52)
- 收藏
- 关注
原创 Python pip 安装与使用
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py # 下载安装脚本。$ sudo python3 get-pip.py # 运行安装脚本。$ sudo python get-pip.py # 运行安装脚本。pip --version # Python2.x 版本命令。pip3 --version # Python3.x 版本命令。
2022-09-11 15:06:32
1248
原创 Centos 8升级到 Centos Stream
转载自: https://blog.youkuaiyun.com/ldy/article/details/121454918。
2022-09-11 15:03:42
221
原创 Qt元类型
摘自:https://segmentfault.com/a/1190000006870047#include 1.Q_DECLARE_METATYPE使用Q_DECLARE_METATYPE标记自定义类型,可以让QMetaType查询到类型,也可以让QVariant识别。#include struct MyStruct {QString name;QString color;};Q_DECLARE_METATYPE(MyStruct)MyStruct myStruct;QVariant
2021-10-31 20:54:47
477
原创 Qt常用宏的使用
Q_DECLARE_INTERFACE此宏用于把标识符与类名接口关联起来。这个标识符是唯一的,举个栗子:#define BrushInterface_iid “org.qt-project.Qt.Examples.PlugAndPaint.BrushInterface”Q_DECLARE_INTERFACE(BrushInterface, BrushInterface_iid)2.Q_PLUGIN_METADATA这个宏被用于声明元数据,这个元数据是被实例化插件的一部分。这个宏需要通过对象声.
2021-10-31 20:45:22
880
原创 QT网络通讯
Qt中提供的所有的Socket类都是非阻塞的。QTcpServer用于TCP/IP通信, 作为服务器端套接字使用QTcpSocket用于TCP/IP通信,作为客户端套接字使用。QUdpSocket用于UDP通信,服务器,客户端均使用此套接字。...
2021-10-13 00:05:21
239
原创 字符串切割
split 按照指定的字符分割,如按照";"或 "/"等分割QString str = “hello,world”QStringList list = str.split(",");
2021-10-07 10:34:20
98
原创 错误 “xxxx“:C++提示非标准语法;请使用 “&“ 来创建指向成员的指针
修改在提示的那一行认真检查类成员函数的调用,如Widget.name//Widget.name(); 正确的调用方式12原因你使用应该是类的成员函数,而不是类的成员变量当我们使用类的成员函数时,VS编辑器并不会自动帮我们加上圆括号(它会提示是成员函数,还是成员变量哦[图标颜色不同]),所以很多新手会忘记加()以表示函数的调用。当不加括号是,也就是函数不传入参数(void也是参数哦)的话,编译器将会理解成函数指针(在c++中,函数名就是函数的起始地址),但函数指针需要这样写&Widg
2021-09-15 10:14:32
582
原创 类似 VS2013+QT5编译时error C2662: 不能将“this”指针从“const QgsFields”转换为“QgsFields &” : this指针也可以转换
常量转换非常量很危险,常量的设计是为了不改变对象成员值,如果你硬要转换,可以:(QgsFields &)对象名;//C语言风格的强转const_cast<引用类型或指针类型>(对象名);//C++风格的强转,去const化举例如下:const int a = 1;int &b = (int&)a; //合法int &c = a; //不合法int &d = const_cast<int&>(a);//合法...
2021-09-14 15:17:51
239
原创 QSS--文件加载形式
#include “QWbutton.h”#include#include#include QWbutton::QWbutton(QWidget *parent): QWidget(parent){ui.setupUi(this);QPushButton * closeBtn = new QPushButton(this);QRect a(10, 10, 100, 30);closeBtn->setGeometry(a);// closeBtn->setStyleSheet
2021-08-24 10:58:24
109
原创 动态链接库
一.QT----动态链接库.1.先创建widget.2.创建dll3.设置C++包含目录,为DLL头文件目录4.设置C++库目录,为DLL的lib目录.(后设置为widget的.exe目录),或者自己拷贝.dll,.lib后设置为widget的.exe目录.5.设置连接器输入,dll.lib名....
2021-08-23 19:14:48
161
原创 QRadioButton--单选框
#include “mainwindow.h”#include “ui_mainwindow.h”#include#include#include#include#includeusing namespace std;MainWindow::MainWindow(QWidget *parent): QMainWindow(parent), ui(new Ui::MainWindow){QRadioButton *qccb=new QRadioButton(this);qccb-&g
2021-08-18 11:39:59
126
原创 QT多选按钮
#include “mainwindow.h”#include “ui_mainwindow.h”#include#include#include#includeusing namespace std;MainWindow::MainWindow(QWidget *parent): QMainWindow(parent), ui(new Ui::MainWindow){QCheckBox *qccb=new QCheckBox(this);qccb->setGeometry(0
2021-08-18 11:28:13
918
原创 qt单选--按钮
#include “mainwindow.h”#include “ui_mainwindow.h”#include#include#include#includeusing namespace std;MainWindow::MainWindow(QWidget *parent): QMainWindow(parent), ui(new Ui::MainWindow){QCheckBox *qccb=new QCheckBox(this);qccb->setGeometry(0
2021-08-18 11:25:39
261
原创 QComboBox--下来列表
#include “mainwindow.h”#include “ui_mainwindow.h”#include#include#include#include#include#include#includeusing namespace std;MainWindow::MainWindow(QWidget *parent): QMainWindow(parent), ui(new Ui::MainWindow){ui->setupUi(this);QComboBox
2021-08-18 11:05:54
70
原创 菜单栏——qt
#include “mainwindow.h”#include “ui_mainwindow.h”#include#include#include#include#include#include#include#include#includeusing namespace std;MainWindow::MainWindow(QWidget *parent): QMainWindow(parent), ui(new Ui::MainWindow){ui->setupUi
2021-08-18 10:33:56
116
原创 QToolBox
#include “mainwindow.h”#include “ui_mainwindow.h”#include//#include#include#include#includeusing namespace std;MainWindow::MainWindow(QWidget *parent): QMainWindow(parent), ui(new Ui::MainWindow){ui->setupUi(this);// qDebug()<toolBox-&g
2021-08-18 09:18:59
117
转载 linux基础
https://blog.youkuaiyun.com/weixin_38407447/article/details/90581454#t36
2021-05-21 11:01:14
64
转载 inode,软连接,硬链接,挂载
1.查看每个硬盘分区的inode总数和已经使用的数量,可以使用df命令。df-i由于每个文件都必须有一个inode,因此有可能发生inode已经用光,但是硬盘还未存满的情况。这时,就无法在硬盘上创建新文件。每个inode都有一个号码,操作系统用inode号码来识别不同的文件。这里值得重复一遍,Unix/Linux系统内部不使用文件名,而使用inode号码来识别文件。对于系统来说,文件名只是inode号码便于识别的别称或者绰号。表面上,用户通过文件名,打开文件。实际上,系统内...
2021-05-21 10:56:25
454
1
原创 vim简单使用
1./ 查找,/被查找词,n是查找下一个,shift+n是往上查找2.?查找,?被查找词,n是查找上一个,shift+n是往下查找
2021-05-21 10:53:49
122
原创 C#与c++接口导入导出
C#一、[DllImport(“GIS3X.dll”,CallingConvention=CallingConvention.StdCall,CharSet=CharSet.Ansi)]public static extern bool LoadJB();二、public void LoadJB(){if(gis_TypeGISType.MGIS){}else if(gis_TypeGISType.GIS3X){CommGIS3XDll.LoadJB();}}三、if(mapD
2020-10-13 09:36:01
423
原创 QT——(无规则)多边形图形填充。
this可以指向类内部非静态成员。path.lineTo();用循环的话不填充。将path的轨迹写出来的话,就有填充。
2020-09-16 19:11:05
3771
原创 EV_一些笔记
1.调用库要写导出符号。2.库里有widget,widget要使用指针形式,不然库外调不到ui_XXX_h头文件。或者要将ui_XXX_h加在外部库里。
2020-09-11 17:27:36
117
原创 Qt设置窗体位置与窗体大小
//设置位置voidsetGeometry(int x, int y, int w, int h)voidsetGeometry(const QRect &)//设置大小voidresize(int w, int h)voidresize(const QSize &)
2020-09-09 09:56:58
3845
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人