docs: 更新文章
This commit is contained in:
parent
3e203c345c
commit
e24c61a359
20
ExCRLF/CMakeLists.txt
Normal file
20
ExCRLF/CMakeLists.txt
Normal file
@ -0,0 +1,20 @@
|
||||
cmake_minimum_required(VERSION 3.14)
|
||||
|
||||
project(ExCRLF LANGUAGES CXX)
|
||||
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
|
||||
set(CMAKE_AUTOUIC ON)
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTORCC ON)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
find_package(QT NAMES Qt6 Qt5 COMPONENTS Core REQUIRED)
|
||||
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Core REQUIRED)
|
||||
|
||||
add_executable(ExCRLF
|
||||
main.cpp
|
||||
)
|
||||
target_link_libraries(ExCRLF Qt${QT_VERSION_MAJOR}::Core)
|
4
ExCRLF/bin/ExCRLF.txt
Normal file
4
ExCRLF/bin/ExCRLF.txt
Normal file
@ -0,0 +1,4 @@
|
||||
(abcdefg1234hijk)
[FOXES](abcdefg1234hijk)
|
||||
[FOXES](abcdefg1234hijk)
|
||||
[FOXES](abcdefg1234hijk)
|
||||
[FOXES]
|
51
ExCRLF/main.cpp
Normal file
51
ExCRLF/main.cpp
Normal file
@ -0,0 +1,51 @@
|
||||
#include <QCoreApplication>
|
||||
#include <QDebug>
|
||||
#include <QFile>
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QCoreApplication a(argc, argv);
|
||||
|
||||
// QString s1 = "(abcdefg1234hijk)";
|
||||
// QString s2 = "[FOXES]";
|
||||
|
||||
QString s1 = "(abcdefg1234hijk)\r[FOXES]";
|
||||
QString s2 = "(abcdefg1234hijk)\n[FOXES]";
|
||||
QString s3 = "(abcdefg1234hijk)\r\n[FOXES]";
|
||||
QString s4 = "(abcdefg1234hijk)\n\r[FOXES]";
|
||||
|
||||
qDebug()<< "---------qDebug()----------";
|
||||
qDebug()<< s1;
|
||||
qDebug().noquote()<< s1;
|
||||
qDebug()<< s2;
|
||||
qDebug().noquote()<< s2;
|
||||
qDebug()<< s3;
|
||||
qDebug().noquote()<< s3;
|
||||
qDebug()<< s4;
|
||||
qDebug().noquote()<< s4;
|
||||
|
||||
qDebug()<< "---------cout----------";
|
||||
cout << "(abcdefg1234hijk)\r[FOXES]";
|
||||
cout.flush();
|
||||
cout << "(abcdefg1234hijk)\n[FOXES]";
|
||||
cout.flush();
|
||||
cout << "(abcdefg1234hijk)\r\n[FOXES]";
|
||||
cout.flush();
|
||||
cout << "(abcdefg1234hijk)\n\r[FOXES]";
|
||||
cout.flush();
|
||||
|
||||
QFile file("ExCRLF.txt");
|
||||
file.open(QIODevice::WriteOnly | QIODevice::Text);
|
||||
file.write("(abcdefg1234hijk)\r[FOXES]");
|
||||
file.write("(abcdefg1234hijk)\n[FOXES]");
|
||||
file.write("(abcdefg1234hijk)\r\n[FOXES]");
|
||||
file.write("(abcdefg1234hijk)\n\r[FOXES]");
|
||||
file.close();
|
||||
|
||||
|
||||
|
||||
|
||||
return a.exec();
|
||||
}
|
@ -148,10 +148,11 @@
|
||||
- [乱码原因(Qt版本)_附上语文的pdf版本](https://blog.csdn.net/qq_33154343/article/details/79039644)
|
||||
- [qt中文乱码问题](https://blog.csdn.net/qq_33154343/article/details/78686103)
|
||||
- [借Qt中文乱码谈谈Coding中的编码问题](https://blog.csdn.net/qq_33154343/article/details/78686075)
|
||||
- [一个微软自带的 notepad 所导致的问题](https://xmuli.blog.csdn.net/article/details/123508220) [★]
|
||||
|
||||
<br>
|
||||
|
||||
- [Qt4和Qt5的信号和槽的使用差异](https://xmuli.blog.csdn.net/article/details/118346008)
|
||||
- [Qt4和Qt5的信号和槽的使用差异](https://xmuli.blog.csdn.net/article/details/118346008)
|
||||
- `qt`中 Lambda 表达式
|
||||
|
||||
<br>
|
||||
|
Loading…
Reference in New Issue
Block a user