QTreeView和数据库问题,很急!!
Qt中如何把QtreeView中的数据存入数据库?求代码 --------------------编程问答-------------------- 看它的demoa ,, --------------------编程问答-------------------- 能详细的说一下思路吗 --------------------编程问答-------------------- 先得到QtreeView的数据,然后在存。。QSqlQuery query;
query.exec("create table hello(id bigint not null auto_increment,name varchar(255),age bigint,primary key (id))");
query.exec("insert into hello(name, age) values('xiaoxi', 18)");
query.exec("insert into hello(name, age) values('xiaonan', 19)");
query.exec("insert into hello(name, age) values('xiaobei', 20)");
query.exec("insert into hello(name, age) values('xiaodong', 21)");
补充:移动开发 , Qt