2018年5月21日
摘要: In the qtcreator go to the "Projects tab" and set "Make arguments" as you like: http://stackoverflow.com/questions/8860712/setting-default-make-option 阅读全文
posted @ 2018-05-21 15:32 苦涩的茶 阅读(1865) 评论(0) 推荐(0)
摘要: 1.用法示例1 String str = QString("%1 %2 %3 %4 %5 %6 %7 %8 %9 %10 %11").arg("1","2","3","4","5","6","7","8","9"); qDebug() << str << endl; 输出 "1 2 3 4 5 6 阅读全文
posted @ 2018-05-21 15:02 苦涩的茶 阅读(1650) 评论(1) 推荐(0)
摘要: 对于QString和QByteArray,他们都有一个toInt的静态函数,QString::toInt()是根据string的字面值转化为int类型,比如string:"123",转化为int类型就变为int:123。而对于QByteArray::toInt()是将16进制的数据转化为10进制之后 阅读全文
posted @ 2018-05-21 14:58 苦涩的茶 阅读(9218) 评论(0) 推荐(0)
摘要: 平时我们在设计数据库表的时候总会设计 unique 或者 给表加上 primary key 的限制条件. 此时 插入数据的时候 ,经常会有这样的情况: 我们想向数据库插入一条记录: 若数据表中存在以相同主键的记录,我们就更新该条记录。 否则就插入一条新的记录。 逻辑上我们需要怎么写: $result 阅读全文
posted @ 2018-05-21 14:55 苦涩的茶 阅读(335) 评论(0) 推荐(0)

// 1.生成目录索引列表