我的主页

快递查询 :http://m.kuaidi100.com     爱快递查询 :http://www.aikuaidi.cn/              

http://www.qtcn.org/bbs/u/168050  [收藏] [复制]

w642833823

  • 8

    关注

  • 25

    粉丝

  • 24

    访客

  • 等级:新手上路
  • 总积分:40
  • 保密,2011-12-07

最后登录:2020-05-25

更多资料

日志

2020-05-25 15:22

//延时
void SLEEP::sleep(int sec)
{
    QTime dieTime = QTime::currentTime().addMSecs(sec);
    while( QTime::currentTime() < dieTime )
        QCoreApplication::processEvents(QEventLoop::AllEvents, 100);
}

阅读全文»分类:QT|回复:0|浏览:9
2020-05-09 15:05

//获取当前系统语言环境,并设置语言
static QString find_translation_file()
{
QString locale = QLocale::system().name(); // language code + country code (xx_XX)
QString language = locale.mid(0, 2); // language code (first two chars of locale)
QString translation_file_basename =
//QDir(Paths::translationPath()).absoluteFilePath("mystiq_");
QDir(":/translations/").absoluteFilePath("mystiq_");

// look for mystiq_xx_XX.qm in the translation directory
QString trans ..

阅读全文»分类:QT|回复:0|浏览:50
2020-04-24 13:51

QDir dir3;
//判断以参数中为路径名的路径是否存在,如果存在该路径则返回真
if(dir3.exists(Path)==NULL)
{
//该函数是创建以Path为路径的一个路径,如果父路径不存在的话,则一起同时创建;创建成功返回1,否则返回0
// dir3.mkdir(Path);
dir3.mkpath(Path);
qDebug()<<"路径创建成功";

}
else
qDebug()<<"路径已经存在";

阅读全文»分类:QT|回复:0|浏览:44
2020-04-01 14:56

//复杂的QTJson数组QJsonArray arrays; for (int i = 0; i < 5;i++) { arrays.insert(i, QString("复杂数据组:%1").arg(image)); } QJsonObject json_ct; json_ct.insert("ct","24"); json_ct.insert("cv","10000"); QJsonObject json_albumMid; json_albumMid.insert("albumMid",QString("%1").arg(album_Mid));
QJsonObject json_albumDetail; json_albumDetail.insert("module","music.musichallAlbum.AlbumInfoServer"); json_a ..

阅读全文»分类:QT|回复:0|浏览:99
2019-10-03 23:39

import QtQuick 2.4
import QtQuick.Controls 1.3
import QtQuick.Window 2.2
import QtQuick.Dialogs 1.2
import QtMultimedia 5.4

ApplicationWindow {
title: qsTr("简易视频播放器")
width: 640
height: 480
visible: true
Rectangle {
color: "black"
anchors.fill: parent

MediaPlayer {
id: mediaPlayer
source: "file:///storage/sdcard0/1.mp4"
autoPlay: true
}

Rectangle {
color: "black"
anchors.fill: parent

VideoOutput {
id: video
anchors.fill ..

阅读全文»分类:手机端开发版|回复:0|浏览:589
2019-09-24 16:50

//需要指定文件路径,和后缀名

QString GetName::set_file_name(QString path,QString suffix_name)
{
//判断路径是否存在
QDir dir(path);
if(!dir.exists())
{
return "文件夹不存在或者路径不正确";
}
dir.setFilter(QDir::Files | QDir::NoSymLinks);
QFileInfoList list = dir.entryInfoList();

int file_count = list.count();
if(file_count <= 0)
{
return "文件不存在";
}
//开始处理

QString string_list;
for(int i=0; i<list.count();i++)
{
QFileInfo file_info = list.at(i ..

阅读全文»分类:QT|回复:0|浏览:305
2019-09-13 17:26

//单独设置背景图片


QString path =QString("background-image:url(../storage/sdcard1/Music/image/%2.png)").arg(name);

song_pic->setStyleSheet(path);

阅读全文»分类:手机端开发版|回复:2|浏览:275
2019-09-12 21:55

#include <QtNetwork>
//#include <QHostInfo>
//#include <QHostAddress>

/*
*获取本机Ip地址
*/

QList<QHostAddress> ipAddressesList = QNetworkInterface::allAddresses();
QString ipAddress;
// use the first non-localhost IPv4 address
for (int i = 0; i < ipAddressesList.size(); ++i) {
if (ipAddressesList.at(i) != QHostAddress::LocalHost &&
ipAddressesList.at(i).toIPv4Address()) {
ipAddress = ipAddressesList.at(i).toString();
break;
}
}
// if we did not ..

阅读全文»分类:默认分类|回复:0|浏览:173
2019-09-11 05:25

可以使用setFixedsize函数来指定大小

阅读全文»分类:QT|回复:1|浏览:183
2019-09-11 05:21

###指定moc命令将含Q_OBJECT的头文件转换成标准.h文件的存放目录
MOC_DIR=$$PWD/../temp/moc
RCC_DIR=$$PWD/../temp/rcc
UI_DIR=$$PWD/../temp/ui
OBJECTS_DIR=$$PWD/../temp/obj
DESTDIR=$$PWD/../temp/bin

阅读全文»分类:QT|回复:1|浏览:150
12

Powered by phpwind v8.7 Certificate Copyright Time now is:05-25 18:09
©2005-2016 QTCN开发网 版权所有 Gzip disabled