CTRL+Enter发送信息的实现 在现在的即时聊天程序中,一般都设置有快捷键来实现一些常用的功能,类似QQ可以用CTRL+Enter来实现信息的发送。 在QT4中,所有的事件都继承与QEvent这个类,以下是用QEvent来实现快捷键的功能。 首先所有QT类的基类QObject有一个成员函数ins Read More
posted @ 2017-01-04 23:55
findumars
Views(1566)
Comments(0)
Diggs(0)
很久以前写过《Qt数据库操作》的一篇文章,在操作数据库的时候,温习了一下!感觉很好!但在操作Oracle数据库时又遇到了一些问题。在使用QSqlRelationalTableModel操纵表的时候,却无法显示。这里使用QT中自带的例子$QTDIR\examples\sql\relationaltab Read More
posted @ 2017-01-04 23:54
findumars
Views(2956)
Comments(0)
Diggs(0)
上回书讲到《Oracle 10g在Solaris 10中安装详解》,现在开始用Qt来编译下Oracle 10g驱动吧!这样就可以通过Qt程序联入Oracle数据库了! Oracle的环境变量: ORACLE_BASE=/oracle ORACLE_HOME=$ORACLE_BASE/product/ Read More
posted @ 2017-01-04 23:53
findumars
Views(359)
Comments(0)
Diggs(0)
Server SQL中的存储过程如下: CREATE procedure PINSERTPC @pcnum int, @pcname varchar(50), @pctype int, @ipaddress varchar(50), @port int, @pcid int outputas --d Read More
posted @ 2017-01-04 23:52
findumars
Views(3186)
Comments(0)
Diggs(0)
在Qt中并没有Sleep函数可以调用,在程序编写时往往需要休眠几秒,这里举出两个方法,不知道是否啥不良隐患没~~ 方法一: class SleeperThread : public QThread{public: static void msleep(unsigned long msecs) { Q Read More
posted @ 2017-01-04 23:50
findumars
Views(14888)
Comments(0)
Diggs(0)
前面我们说了Qt提供的几个预定义model。但是,面对变化万千的需求,那几个model是远远不能满足我们的需要的。另外,对于Qt这种框架来说,model的选择首先要能满足绝大多数功能的需要,这就是说,可能这个model中的某些功能你永远也不会用到,但是还要带着它,这样做的后果就是效率不会很高。所以, Read More
posted @ 2017-01-04 23:20
findumars
Views(2892)
Comments(0)
Diggs(0)
http://doc.trolltech.com/main-snapshot/model-view-programming.html 介绍 Qt 4推出了一组新的item view类,它们使用model/view结构来管理数据与表示层的关系。这种结构带来的功能上的分离给了开发人员更大的弹性来定制数据 Read More
posted @ 2017-01-04 23:17
findumars
Views(4156)
Comments(0)
Diggs(1)
ddd Read More
posted @ 2017-01-04 21:05
findumars
Views(134)
Comments(0)
Diggs(0)
http://blog.csdn.net/kokjuis/article/details/53586406 http://download.csdn.net/detail/kokjuis/9709325 Read More
posted @ 2017-01-04 21:04
findumars
Views(649)
Comments(0)
Diggs(0)
http://blog.csdn.net/kokjuis/article/details/53537029 Read More
posted @ 2017-01-04 21:03
findumars
Views(242)
Comments(0)
Diggs(0)
http://blog.csdn.net/xyang81/article/details/52837974 http://download.csdn.net/detail/xyang81/9667493 Read More
posted @ 2017-01-04 19:42
findumars
Views(202)
Comments(0)
Diggs(0)
SIGNAL-SLOT是Qt的一大特色,使用起来十分方便。在传统的AWT和Swing编程中,我们都是为要在 监听的对象上添加Listener监听器。被监听对象中保存有Listener的列表,当相关事件发生时,被监听 对象会通知所有Listener。而在Qt中,我们只需通过connect方法连接两个对 Read More
posted @ 2017-01-04 19:07
findumars
Views(798)
Comments(0)
Diggs(0)

浙公网安备 33010602011771号