今天开始进入 Qt 的另一个部分:文件读写,也就是 IO。文件读写在很多应用程序中都是需要的。Qt 通过 QIODevice 提供了IO的抽象,这种设备(device)具有读写字节块的能力。常用的IO读写的类包括以下几个: QProcess、QTcpSocket、QUdpSoctet 和 QSslS Read More
posted @ 2016-10-19 23:34
findumars
Views(1362)
Comments(0)
Diggs(0)
SortDialog::SortDialog(QWidget *parent) : QDialog(parent) { setupUi(this); groupBox_2->hide(); groupBox_3->hide(); layout()->setSizeConstraint(QLayout Read More
posted @ 2016-10-19 23:33
findumars
Views(2487)
Comments(0)
Diggs(0)
#include <iostream>#include <QFile>#include <QImage>#include <QMap>#include <QColor> class C {public: C(quint32 value = 0) : value(value) { } // Overr Read More
posted @ 2016-10-19 23:32
findumars
Views(10063)
Comments(0)
Diggs(0)
#include <iostream>#include <QChar>#include <QFile>#include <QTextStream>#include <sstream>#include <string> int main(int argc, char *argv[]) { // Qt Read More
posted @ 2016-10-19 23:31
findumars
Views(845)
Comments(0)
Diggs(0)
#include <iostream>#include <QString>#include <QList>#include <QListIterator> int main(int argc, char *argv[]) { QList<QString> list; list << "One" << Read More
posted @ 2016-10-19 23:29
findumars
Views(2585)
Comments(0)
Diggs(0)
#include <iostream>#include <QApplication>#include <QThread>#include <QString> class Thread : public QThread {public: Thread(QString name = "") { stop Read More
posted @ 2016-10-19 23:28
findumars
Views(3885)
Comments(0)
Diggs(0)
QPainter 能绘制: point, line, rectangle, ellipse, arc, chord, polygon, pie segment, Bezier curve, QPixmap, QImgeQt支持的高级特性: antialising, alpha blending, g Read More
posted @ 2016-10-19 23:27
findumars
Views(1894)
Comments(0)
Diggs(0)
解压下载到的.gz源码:gunzip xxx.tar.gztar xvf xxx.tar, 其实在Mac中可以直接双击解压的.然后定位到解压后的目录下:./configuremakesudo make install这样Qt就会被安装到/usr/local/Trolltech/qt-4.4.0 了这 Read More
posted @ 2016-10-19 23:26
findumars
Views(1184)
Comments(0)
Diggs(0)
#include "BuiltinDialog.h" #include <QtGui/QTextEdit> #include <QtGui/QPushButton> #include <QtGui/QFileDialog> #include <QtGui/QFontDialog> #include Read More
posted @ 2016-10-19 23:25
findumars
Views(643)
Comments(0)
Diggs(0)
界面中的字符串, 尽量的使用QObject::tr(text); 以便以后转换界面语言, 即使现在你还不考虑这个问题. 方法一: 每次设置时都使用: button->setText(QApplication::translate("", "好吗?", 0, QApplication::Unicode Read More
posted @ 2016-10-19 23:23
findumars
Views(14644)
Comments(0)
Diggs(0)
1.Qt的风格 a) Qt简介 Qt是一个跨平台的C++图形用户界面应用程序开发库,使用Qt可以开发出高质量的图形用户接口,它是完全面向对象的、易于扩展且允许真正的组件编程。Qt获得了很大的成功,特别是它的信号-槽机制是非常值得研究的通信机制,它也是Linux发行版标准组件KDE(K Desktop Read More
posted @ 2016-10-19 23:21
findumars
Views(3186)
Comments(0)
Diggs(0)
关于用Delphi中的Indy控件实现收发邮件的几点学习记录 这几天心里颇不宁静,不是因为项目延期,而是因为自己几个月前做的邮件发送程序至今无任何进展,虽然一向谦虚的人在网上发贴总以“小弟”自称。也发过N多关于此类问题的贴子,但总是收益甚少,但也十分感谢参与贴子的各位同仁。必竟,用Indy控件实现收 Read More
posted @ 2016-10-19 23:20
findumars
Views(330)
Comments(0)
Diggs(0)
原文链接:Qt 图形特效(Graphics Effect)介绍 QGraphicsEffect也是Qt-4.6引入的一个新功能。它让给图形元素QGraphicsItem增加更佳视觉效果的编程变得非常简单。 先来看几张效果图。 上图中最上面的那个图片是没有使用QGraphicsEffect处理的原图, Read More
posted @ 2016-10-19 23:14
findumars
Views(4221)
Comments(0)
Diggs(0)
Qt:使用自定义的字体 1. 下载字体文件 2. 加载字体文件 3. 使用字体 QFontDatabase::addApplicationFont("XENOTRON.TTF"); ui->toolButton_2->setFont(QFont("XENOTRON", 34)); http://ww Read More
posted @ 2016-10-19 23:13
findumars
Views(3141)
Comments(0)
Diggs(0)
根据 src/corelib/global.h template <typename T>class QGlobalStatic{public: T *pointer; inline QGlobalStatic(T *p) : pointer(p) { } inline ~QGlobalStatic Read More
posted @ 2016-10-19 23:12
findumars
Views(1440)
Comments(0)
Diggs(0)
创建一个QT的库项目,删除自动生成的.h和.cpp文件,添加一个接口定义.h文件和一个接口实现类(一个.h一个.cpp).代码如下: 1.接口文件源码 #ifndef PLUGININTERFACE_H#define PLUGININTERFACE_H #include <QString> clas Read More
posted @ 2016-10-19 23:11
findumars
Views(466)
Comments(0)
Diggs(0)
当你觉得写代码是一件重复性极高的工作时,这时你就应该考虑换个方式来实现了。 提高代码效率,减少代码量。 代码片: [cpp] view plain copy print? void Widget::onClicked() { QPushButton* button = qobject_cast<QP Read More
posted @ 2016-10-19 23:06
findumars
Views(948)
Comments(0)
Diggs(0)
From: http://blog.csdn.net/kfbyj/article/details/9284923 最近做项目遇到的问题,总结下。 有时候我们觉得系统的标题栏和按钮太丑太呆板,想做自己的标题栏以及最大化、最小化、关闭,菜单按钮,我们就需要 [cpp] view plaincopypri Read More
posted @ 2016-10-19 23:05
findumars
Views(3598)
Comments(0)
Diggs(0)
采用自身模块规范编写的前端UI框架,遵循原生HTML/CSS/JS的书写形式,极低门槛,拿来即用。 http://www.layui.com Layui 是一款采用自身模块规范编写的国产前端UI框架,遵循原生HTML/CSS/JS的书写与组织形式,门槛极低,拿来即用。其外在极简,却又不失饱满的内在, Read More
posted @ 2016-10-19 22:21
findumars
Views(576)
Comments(0)
Diggs(0)
HTML 已经发展了多年,现在 W3C 已经发布了 HTML 5.1 的提案推荐标准,一些陈旧废弃的标签已经在后继的标准中逐渐消失。这里为大家列出那些已经被废弃 HTML 标签,看看你是不是还在使用它们。 <acronym> 首字母缩写,例如 WWW 类似的有<abbr>标签,表示单词缩写,例如 < Read More
posted @ 2016-10-19 22:16
findumars
Views(7459)
Comments(0)
Diggs(0)