- 博客(49)
- 资源 (113)
- 收藏
- 关注
原创 Qt 程序发布 / 运行环境
1. Qt程序打包1) cmd 命令 切换至 D:\Qt\Qt5.12.10\5.12.10\msvc2017_64\bin 目录下2) 将 编译生成程序复制到D:\QtTest_0906 目录下3) QtWidgetsApplication1.exe是要运行的 exe 程序,执行以下命令,D:\Qt\Qt5.12.10\5.12.10\msvc2017_64\bin>windeployqt D:\QtTest_0906\QtWidgetsApplication1.exe...
2021-09-07 18:44:06
755
原创 lib 库 dll 库总结
https://baike.baidu.com/item/lib/2395664?fr=aladdinLIB有两种一种是静态库,比如C-Runtime库,这种LIB中有函数的实现代码,一般用在静态连编上,它是将LIB中的代码加入目标模块(EXE或者DLL)文件中,所以链接好了之后,LIB文件就没有用了。一种LIB是和DLL配合使用的,里面没有代码,代码在DLL中,这种LIB是用在静态调用DLL上的,所以起的作用也是链接作用,链接完成了,LIB也没用了。至于动态调用DLL的话,根本用不上L...
2021-09-03 17:25:01
291
原创 Qt 国际化/多语言
1. 代码中所有需要翻译的字符串用 "tr(") 包含 2. 在 pro 文件中添加 TRANSLATIONS += resources/multiLang_zh.ts \ resources/multiLang_en.ts 3. 生成ts文件 1) 工程目录新建文件夹 resources 2) 执行 "工具/外部/QT语言家/...
2021-08-19 10:12:34
298
原创 Qt教程 笔记3
1. Qt 父子对象机制是在 QObject 中实现的。当利用一父对象创建一子对象(窗口部件、检验器、任意其他类型)时,父对象会把此子对象添加到自己的子对象列表中。 当删除父对象时,会遍历子对象列表并删除每一个子对象。然后,子对象再去删除它们自己所包含的每个子对象。如此反复递归调用,直至清空所有子对象。 这种父子对象机制很大程度上简化了内存管理,降低内存泄露的风险。需要明确删除的对象是那些使用new创建的并且没有父对象的对象。 如果在删除父对象之前先删除其子对象,Qt会自动从父对象列...
2021-01-11 18:06:42
391
原创 Qt教程 笔记1
Qt教程 (http://c.biancheng.net/qt/)1. 安装QT 配置环境变量 右键[我的电脑]/[属性]/[高级系统设置]/[高级]/[环境变量]/[系统变量]/选[Path]/[编辑] 添加如下内容 C:\Qt\Qt5.9.8\5.9.8\mingw53_32\bin; C:\Qt\Qt5.9.8\5.9.8\msvc2013_64;2.工程路径不能包含中文,否则如下错误提示 Cannot find file: E:\Users\A...
2021-01-07 13:57:08
1342
原创 Qt教程 笔记2
1 design form本来就是只会生成一个.ui文件。 Qt设计师界面类才是生成.h .cpp .ui三个文件的。 2 字符串格式化 方法1:QString result;QTextStream(&result) << "pi = " << 3.14;qDebug()<< result;QString s1("1234567890");int n = 123; 方法2:QString...
2021-01-06 18:00:45
601
1
原创 MFC Tab Control 控件示例
1. 新建一个MFC项目 1) 文件/新建/项目/ 2) 选择"MFC 应用程序",并输入名称 "MFCTabCtrlTest",点"确定" 3) 下一步 4) 选择"基于对号框",点击"下一步" 5) 可以勾选"最小化框"、"最大化框", 可以输入 "对话框标题:Tab Control 测试" 6) 可直接点"完成" 或 点"下一步"后再点"完成"2. ...
2019-06-14 17:40:58
917
原创 开启telnet服务
运行telnet命令出现如下错误提示:没有开启telnet客户端Win7 默认是禁用 telnet 服务, 启动 Telnet 功能步骤如下:1. 开启 telnet 服务(控制面板/查看方式:类别/程序/启用或关闭Windows功能/Telnet客户端/确定)2. 启动telnet服务 1) 控制面板\查看方式:大图标\管理工具\服务 2) 右击...
2019-04-09 17:32:36
7805
2
原创 Windows Server 2008 修改 MySQL数据库存储路径
1) 关闭mysql服务 控制面板\所有控制面板项\管理工具\服务\MySQL56\右击\停止 2) 打开 mysql.ini 文件 C:\ProgramData\MySQL\MySQL Server 5.6\my.ini 3) 修改datadir=C:/ProgramData/MySQL/MySQL Server 5.6/Data d...
2019-04-03 11:27:07
926
转载 HTML5与CSS3基础教程(中文第8版)笔记:第 1 章 网页的构造块
1.2 基本的 HTML 页面<!DOCTYPE html><html lang="en"> <head> <meta charset="utf-8" /> <title>Your page title</title> </head> <b
2018-09-18 16:40:39
283
原创 WPF ProgressBar 绑定
界面<Window x:Class="ProgressBarBindingTest.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" ...
2018-07-27 15:48:34
2827
转载 用 RadWindow 做主窗口
1. 1) 打开 MainWindow.xaml 文件,用 RadWindow 替换 Window 声明telerik:RadWindow x:Class="RadWindowAsMainWindow.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2016-01-08 14:01:24
904
转载 C#,WPF note
WPF中UI上和后台代码中的换行符不同XAML中为 C#代码中为 \r\n 或者: Environment.NewLine
2015-11-03 16:16:32
526
转载 C# 读写二进制文件
界面:<Window x:Class="BinaryReadWrite.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title
2015-10-26 12:25:47
595
原创 C#调C++动态库Dll C++回调C#函数
vs2010 新建项目 / Visual C++ / 类库; 项目名 MyCallbackDll头文件:定义类 成员函数// MyCallbackDll.h#pragma onceusing namespace System;#ifdef DLL#define DLL_API __declspec(dllexport)#else#define DLL_API#en
2015-10-14 14:24:54
2812
1
转载 C# 泛型
泛型(C# 编程指南) https://msdn.microsoft.com/zh-cn/library/512aeb7t(VS.80).aspx
2015-09-15 17:49:16
305
转载 C# 对象销毁和垃圾回收
资源链接:c# -- 对象销毁和垃圾回收 http://www.cnblogs.com/yang_sy/p/3784151.htmlWPF中解决内存泄露的几点提示与解决方法 http://www.cnblogs.com/LastPropose/archive/2011/08/01/2124359.html浅谈C#托管程序中的资源释放问题
2015-09-14 15:41:43
4016
原创 WPF DataGrid 绑定 DataTable
DataGrid 绑定 DataTable:界面: xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" Heigh
2015-08-22 23:52:22
22232
原创 vs2010 生成目标文件 exe 改为 dll
1. "项目"->"右击"->"属性"->"配置属性"->"常规"->"目标文件扩展名" .exe 改为 .dll2. “项目”->“右击”->“属性”->“配置属性”->“链接器”->“常规”->“输出文件” exe 改为 dll
2015-08-20 14:59:10
2166
转载 WPF DataGrid合并单元格
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" Height="350" Width="625">
2015-08-16 15:02:35
14733
1
原创 C# 调用C/C++ Dll(参数含char*指针,返回char*指针)
动态库://MyPointDll.hextern"C" _declspec(dllexport) char* strcpyTest(char* dest,char* sour);
2015-08-16 12:12:35
22414
转载 telerik:RadGridView 数据绑定
界面: xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" Height="450" Width="500" Wi
2015-08-08 22:14:01
4637
转载 C# Unicode 编码转换
/// /// /// 作用:将字符串内容转化为16进制数据编码,其逆过程是Decode /// 参数说明: /// strEncode 需要转化的原始字符串 /// 转换的过程是直接把字符转换成Unicode字符,比如数字"3"-->0033,汉字"我"-->U+6211 /// 函数
2015-08-07 14:21:45
1076
转载 WPF,C# 数据绑定
微软参考:数据绑定概述:https://msdn.microsoft.com/zh-cn/library/ms752347(v=vs.110).aspx数据绑定概述(XAML): https://msdn.microsoft.com/zh-cn/library/windows/apps/xaml/hh758320.aspx绑定源概述: https://msdn.micros
2015-08-05 21:04:25
594
原创 WPF C# Button 加载图片,背景图片
vs2010 界面: xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" Height="350" W
2015-08-04 14:27:56
10439
原创 WPF 圆形按钮 渐变色
WPF 按钮: xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" Height="350" Width=
2015-07-31 14:19:14
4690
转载 RadGridView
1.不显示第1列即列指示器(Row Indicators) 在 telerik:RadGridView中设置属性 RowIndicatorVisibility="Collapsed"2.不显示最上面的分组面板(Group Panel) 在 telerik:RadGridView中 设置属性 ShowGroupPanel="F
2015-07-29 13:12:19
2142
转载 图片点击事件
图片点击事件方法1:界面: xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" Height="350"
2015-07-27 09:33:37
3708
原创 无标题窗口拖动
功能:拖动无标题窗口环境:vs2010,wpf前台代码: xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow
2015-07-26 13:59:27
626
原创 C# 获取鼠标坐标
功能:C# 获取鼠标坐标界面展示出来环境:vs2010,wpf界面代码: xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Ma
2015-07-26 12:01:09
1829
转载 wireshark抓取本地回环包
一:The NPF driver isn’t running这个错误是因为没有开启NPF服务造成的。NPF即网络数据包过滤器(Netgroup Packet Filter,NPF)是Winpcap的核心部分,它是Winpcap完成困难工作的组件。它处理网络上传输的数据包,并且对用户级提供可捕获(capture)、发送(injection)和分析性能(analysis capabil
2015-07-22 12:55:48
3017
1
转载 vs2010 使用Unicode字符集 CString 与 char *相互转换
CString转换为char * CString strCheckIP ;GetDlgItemText(IDC_IPADDRESS,strCheckIP); 方法一:使用API:WideCharToMultiByte进行转换 //注意:以下n和len的值大小不同,n是按字符计算的,len是按字节计算的
2015-07-08 14:52:32
1022
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人