新鲜事
-
求阶乘 //计算阶乘2! double factorial(double n) { if (n == 0) { return 0; } else { return n * (M_PI / 180); } }
-
void Qsort(int* a, int n) { assert(a);//断言防止越界 for (int i = 0; i < n-1; i++) { for (int j = 0; j < n - 1 - i; ..
-
C语言版: void HSLtoRGB(float h, float s, float l, int* r, int* g, int* b) { if (s == 0) { // 灰色阶段 *r = *g = *b = l * ..
-
tableWidget->setColumnCount(25); tableWidget->setRowCount(11); tableWidget->horizontalHeader()->setVisible(fal ..
-
1.带绝对路径 QString video_File; //mnt/sdcard/ //将路径写入video.txt QString name_file="video.txt"; QFileIn ..
-
1.如何确定中心点: QPainter painter(this); painter.setRenderHints(QPainter::Antialiasing|QPainter::TextAntialiasing); paint ..
-
1.实现动画效果 void Widget::SetButtonStyle(QPushButton *button, QString imgsrc, int CutSec) {//=========================Qss切 ..
-
#android: { message("android") LIBS += -L$$PWD/Android_ssl_lib/libcrypto_1_1.so LIBS += -L$$PWD/Android_ssl ..
-
1.需要时间戳:// 获取当前时间戳 QDateTime timeDate = QDateTime::currentDateTime(); // 获取当前时间 int r = timeDate .toTime ..
-
QByteArray bytes = reply->readAll(); //获取字节 QJsonParseError json_error; QJsonDocument jsonDoc(QJsonDocument::fromJso ..
-
原文章出处 1.不换行:QJsonObject json; //... QJsonDocument doc(json); QString str_json(doc.toJson(QJsonDocument::Compact)); ..
-
#include <QMainWindow> //包含头文件#include <QtTextToSpeech/QTextToSpeech> //添加用到的头文件 #include <QTimer ..
-
auto font = this->font(); //使用自定义字体 QString fontName; int loadedFontID = QFontDatabase::addApplicationFont(&q ..
-
.h #pragma once#include <QString> class GlobalApiClass { private: GlobalApiClass(); ~GlobalApiClass(); public: st ..