qlineedit settext-错误 no matching function for call to 'QLineEdit::setText(QMode|Index&)'

问题描述

错误 no matching function for call to 'QLineEdit::setText(QMode|Index&)'
void gz::on_pushButton_2_clicked()
{
     static QSqlQueryModel *model = new QSqlQueryModel(ui->tableView);
     model->setQuery(QString("select * from yggzinfo;"));
     int column = model->columnCount(); //获得列数
      int row = model->rowCount();    // 获得行数
      QModelIndex index = model->index(column,row,QModelIndex());
     ui->lineEdit->setText(index);
}
时间: 2024-09-03 07:07:43

qlineedit settext-错误 no matching function for call to 'QLineEdit::setText(QMode|Index&)'的相关文章

[c++]no matching function for call to ‘sort(…)......

[问题] 在做LeetCode的Merge Intervals时用到c++的sort函数,一直出这个错误,甚是郁闷.最后终于找到了问题所在. [代码] #include <iostream> #include <algorithm> #include <vector> using namespace std; struct Interval { int start; int end; Interval() : start(0), end(0) {} Interval(i

PHP错误WARNING: SESSION_START() [FUNCTION.SESSION-START]解决方法_php技巧

做开发的时候,操作session有时候会遇到这个问题:Warning: session_start() [function.session-start]-- 系统环境:WIN2003+IIS6+PHP5.2.12 PHP出现类似如下错误: Warning: session_start()[function.session-start]: ...... failed: No such file or directory......等情况, 可以偿试修改一下php.ini文件中的session.au

php CURLOPT错误Warning: curl_setopt() [function.curl-setopt]:...

如果当你在php中运行 CURLOPT_FOLLOWLOCATION 然后得到php提示错误信息为: Warning: curl_setopt() [function.curl-setopt]: CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mode or an open_basedir is set- 错误中提到两个关键safe_mode和 open_basedir,如果你是虚拟主机的没有设置APPCHE的权限是不能通过修改服务

php错误提示:Deprecated: Function eregi() is deprecated

改前:function inject_check($sql_str) {  代码如下 复制代码  $sql_str = strtolower($sql_str);  return eregi('fopen|post|eval|select|insert|and|or|update|delete|'|/*|*|../|./|union|into|load_file|outfile', $sql_str); // 进行过滤 } 解决方法: 找到代码所在的文件 位置  代码如下 复制代码 functi

Error using subsindex Function &amp;#39;subsindex&amp;#39; is not defined for values of class &amp;#39;struct&amp;#39;.

1 clc; clear all; close all; 2 image_path = '/media/wangxiao/Elements/image_segment_backup/'; 3 savePath = '/media/wangxiao/Seagate/wangxiao/additional_data/'; 4 5 threshold = 5000; 6 7 first_files = dir(image_path); 8 9 for i = 3:length(first_files)

c++-Qt中QPropertyAnimation如何使QGraphicsItem动起来(Qt动画的问题)?

问题描述 Qt中QPropertyAnimation如何使QGraphicsItem动起来(Qt动画的问题)? 我又看了一下文档,说了这么一段奇怪的话: 当我们想让QGraphicsItems进行动画,并且使用QPropertyAnimation类.但是,QGraphicsItem没有从 QObject继承.一个好的解决方案是子类话你想要动画的图形项.而且本类也继承自QObject.QPropertyAnimation能被使用在 QGraphicsItems中.以下示例显示了怎么去做.另一个可能

ThinkPHP 3.1快速入门:控制器高级特性

ThinkPHP的控制器层由核心控制器和业务控制器组成,核心控制器由系统内部的App类完成,负责应用(包括模块和操作)的调度控制,包括HTTP请求拦截和转发.加载配置等,业务控制器则由用户定义的http://www.aliyun.com/zixun/aggregation/16339.html">Action类或者其他控制器类完成.我们通过前面的学习,已经了解了基本的控制器用法,这一篇我们来讲述下控制器的一些特性和高级用法,来探索ThinkPHP控制器的神秘外衣. Action参数绑定 在

错误解决!

1.No matching function for call to "..."             分析:表示传入的函数参数不匹配 2.XXX refereced from: vtable for XXX                 分析:vtable和虚函数相关,表示有虚函数没有实现 3.switch case is in protected scope             case添加{ }后,编译错误可解决. - (void)tabBar:(UITabBar *)t

编码-下面的错误怎么改啊,请大家帮帮我,我刚开始写,写不好啊。耐心看一下,谢谢!!

问题描述 下面的错误怎么改啊,请大家帮帮我,我刚开始写,写不好啊.耐心看一下,谢谢!! #include <iostream> #include <string> #define MAX 100 using namespace std; class HTNode { public: int weight; string data; int f; HTNode* father; HTNode* lchild; HTNode* rchild; string code; HTNode()