Qt使用QStandardItemModel的角色控制及QTreeView添加不同的右键菜单...
分类:
其他好文 时间:
2014-05-22 10:22:15
阅读次数:
369
通过自己的错误积累和网上的相关资料,简单的总结了一下出现这种错误常见的情况:
1.编译成功的例子在后台执行,有时一闪而过,如果再次build ,则会提示上述错误。
解决方法:打开任务管理器,找到相应的exe进程,关闭即可; 或者直接关闭QtCreator。
2.没有编译成功的情况下,最常见情况是程序本身需要include的头文件被遗漏了
解决方法:细心查找基类所用的头文件...
分类:
其他好文 时间:
2014-05-22 10:18:48
阅读次数:
308
1).pro文件#-------------------------------------------------
#
# Project created by QtCreator 2014-05-18T12:56:52
#
#-------------------------------------------------
QT += core gui
greaterThan(...
分类:
其他好文 时间:
2014-05-22 09:43:53
阅读次数:
405
就拿杭电OJ上的第1003题开始吧,这题比原书要复杂一些。
Problem Description
Given a sequence a[1],a[2],a[3]......a[n], your job is to calculate the max sum of a sub-sequence. For example, given (6,-1,5,4,-7), the max sum...
分类:
其他好文 时间:
2014-05-22 07:07:27
阅读次数:
322
问题
Given a singly linked list L: L0→L1→…→Ln-1→Ln,
reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→…
You must do this in-place without altering the nodes' values.
For example,
Given {1,2,3,4}, reorde...
分类:
其他好文 时间:
2014-05-22 07:04:46
阅读次数:
298
【题目】
Given a sorted array of integers, find the starting and ending position of a given target value.
Your algorithm's runtime complexity must be in the order of O(log n).
If the target is not found in the array, return [-1, -1].
For example,
Given [5...
分类:
其他好文 时间:
2014-05-22 06:44:39
阅读次数:
265
用QT也已经三四年了,今天从QT的tools中看到qtclucene,原来这个就是从clucene移植过来的一个全文检索工具,用在QTHelp中。
下面是clucene的说明:
CLucene是Lucene的一个C++移植,Lucene是一个基于java的高性能的全文搜索引擎。CLucene因为使用C++编写,所以理论上要比lucene快。[1]
Lucene不是一个完整的全文索...
分类:
其他好文 时间:
2014-05-20 17:17:03
阅读次数:
300
【题目】
Given a string containing just the characters '(' and ')', find the length of the longest valid (well-formed) parentheses substring.
For "(()", the longest valid parentheses substring is "()", which has length = 2.
Another example is ")()())", whe...
分类:
其他好文 时间:
2014-05-20 16:39:07
阅读次数:
280
有时候在做项目的时候我们需要将自己编写的类封装起来,Qt提供了一个很好的封装途径。下面将详细讲述一个简单的库的制作过程,最后再创建另外一个工程,在这个工程里面对封装的库进行调用,从而完成一个dll库从创建到调用的过程。谢谢大家指正!
分类:
其他好文 时间:
2014-05-20 09:15:08
阅读次数:
517
戳我去解题Given a linked list, remove thenthnode from
the end of list and return its head.For example, Given linked list:
1->2->3->4->5, and n = 2. Aft...
分类:
其他好文 时间:
2014-05-20 08:04:28
阅读次数:
291