自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(4)
  • 问答 (2)
  • 收藏
  • 关注

原创 限制Qt的QTableWidget只能输入浮点数,并保留表格特性

项目中需要实现在QTableWidget表格中只能输入浮点数的要求,但上网搜索后,发现使用QLineEdit代理的方法虽然能实现只能输入浮点数的要求(https://blog.csdn.net/gossiplee/article/details/73935771),但这样做表格不能选中,导致无法实现表格的复制粘贴等功能,这应该是因为QTableWidgetItem被QLineEdit取代导致的。所...

2019-06-29 16:15:40 3087 1

原创 LeetCode笔记20. Valid Parentheses

使用堆栈,逐个读取字符,当读取字符为左括号"(","[","{"时,将其压入栈堆,当为右括号时,弹出栈尾元素与其对比,若匹配则继续操作下一元素,否则return false。当全部元素操作完毕,存左括号元素的栈为空,则说明括号正确匹配。public: bool isValid(string s) { int s_size=s.size(); vecto...

2019-02-19 16:41:45 137

原创 LeetCode笔记11. Container With Most Water

简单的一道题目public: int maxArea(vector<int>& height) { int l=height.size(); int i,j; int v,res=0; vector<int> allres; for(i=0;i<l;i++) ...

2019-02-19 15:00:52 140

原创 LeetCode笔记19. Remove Nth Node From End of List

Given a linked list, remove the n-th node from the end of list and return its head.Example:Given linked list: 1->2->3->4->5, and n = 2.After removing the second node from the end, t...

2019-02-19 14:58:02 109

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除