我的主页

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

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

w642833823

  • 7

    关注

  • 20

    粉丝

  • 20

    访客

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

最后登录:2019-11-12

更多资料

日志

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|浏览:192
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|浏览:133
2019-09-13 17:26

//单独设置背景图片


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

song_pic->setStyleSheet(path);

阅读全文»分类:手机端开发版|回复:0|浏览:115
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|浏览:87
2019-09-11 05:25

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

阅读全文»分类:QT|回复:1|浏览:101
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|浏览:85
2019-09-11 05:15

/*

#include <QtNetwork>
#include <QHostInfo>
//方法一
QString localHostName = QHostInfo::localHostName();
//qDebug() <<"localHostName: "<<localHostName;
QHostInfo info = QHostInfo::fromName(localHostName);
//qDebug() <<"IP Address: "<<info.addresses();
QList<QHostAddress> address=info.addresses();
*/ //获取主机的IP地址
//QString Ip=QString(address.first().toString());
//方法二
/*QString detail="";
QList<QNetworkInterfa ..

阅读全文»分类:手机端开发版|回复:0|浏览:87
2019-09-11 05:10

//获取当前路径
QString appDirPath = QCoreApplication::applicationDirPath();
//转换成对应系统路径
QString appDirPaths = QDir::toNativeSeparators(appDirPath);

阅读全文»分类:手机端开发版|回复:0|浏览:43
2019-04-06 16:10

//请求内容需进行URL(utf-8)编码。请求内容JSON格式
QString My_Text_Codec::set_codecUTF8(QString &codee)
{
QTextCodec * codec_UTF8 = QTextCodec::codecForName("UTF-8");
QByteArray byte_UTF8 = codec_UTF8->fromUnicode(codee);
QByteArray byte_Array = byte_UTF8.toPercentEncoding();
return byte_Array;
}

阅读全文»分类:QT|回复:0|浏览:93
2019-04-06 16:08

QString My_Base64::set_base64(const QString &text)
{
QByteArray passArray = text.toUtf8();
return QString(passArray.toBase64()).toUtf8();
}

QString getBase64(const QString &text){
return text.toUtf8().toBase64();
}

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

Powered by phpwind v8.7 Certificate Copyright Time now is:11-12 13:20
©2005-2016 QTCN开发网 版权所有 Gzip disabled