- 博客(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
空空如也
求问各位高手,怎样把Qt的Qwindow嵌入到已有的widget里呢
2019-06-27
TA创建的收藏夹 TA关注的收藏夹
TA关注的人