会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
奥雷连诺
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
8
9
10
11
12
13
14
15
16
···
18
下一页
2013年3月29日
在VS2010中去掉ipch和sdf文件方法
摘要: 使用VS2010建立C++解决方案时,会生成SolutionName.sdf和一个叫做ipch的文件夹,这两个文件再加上*.pch等文件使得工程变得非常的庞大。本文介绍两种方法使得在vs2010中不产生.sdf和ipch文件 方法一:Tools->Options->Text Editor->C/C...
阅读全文
posted @ 2013-03-29 19:30 奥雷连诺
阅读(244)
评论(0)
推荐(0)
2013年3月1日
void QTableView::setColumnWidth ( int column, int width),隐藏列不起作用
摘要: 在项目中遇到了这样的问题,是在使用过滤模型的时候。。在更新模型的时候,当过滤模型删除重新new,而源模型没有重新new后,使用setColumnWidth(intcolumn,intwidth),;就会不起作用。后来我试着不再重新new过滤模型,setColumnWidth就可以使用了。难道过滤模...
阅读全文
posted @ 2013-03-01 13:45 奥雷连诺
阅读(1268)
评论(0)
推荐(0)
2012年11月6日
QTableView根据标题文字和表格文字自适应宽度
摘要: QTableViewm_pTable;m_pTable->horizontalHeader()->setResizeMode(QHeaderView::ResizeToContents);
阅读全文
posted @ 2012-11-06 15:18 奥雷连诺
阅读(715)
评论(0)
推荐(0)
2012年11月5日
QT隐藏工具栏上的右键菜单
摘要: 我在QMainWindow上加了两个工具条,当在工具条上点击右键时会出现菜单,点击菜单会隐藏工具条或者是出现工具条,想在工具条上点击右键是不能让它弹出菜单,QMainWindow的设置this->setContextMenuPolicy(Qt::NoContextMenu);
阅读全文
posted @ 2012-11-05 11:47 奥雷连诺
阅读(1842)
评论(0)
推荐(0)
2012年10月18日
VC判断窗口是否被遮住。 已使用到项目中。
摘要: boolIsCoveredByOtherWindow(HWNDhWnd){RECTrcTarget;GetWindowRect(hWnd,&rcTarget);boolisChild=(WS_CHILD==(GetWindowLong(hWnd,GWL_STYLE)&WS_CHILD));if(G...
阅读全文
posted @ 2012-10-18 10:07 奥雷连诺
阅读(788)
评论(0)
推荐(0)
2012年9月27日
在QMainWindow中使用QGridLayout
摘要: QWidget*widget=newQWidget(mainWindow);widget->setLayout(gridLayout);mainWindow->setCentralWidget(widget);
阅读全文
posted @ 2012-09-27 10:14 奥雷连诺
阅读(465)
评论(1)
推荐(0)
QT的QTreeWidget随着子项的展开,自动出现横滚动条。
摘要: m_pTreeList->header()->setHidden(true);m_pTreeList->header()->setHorizontalScrollMode(QAbstractItemView::ScrollPerPixel);m_pTreeList->header()->setRe...
阅读全文
posted @ 2012-09-27 10:13 奥雷连诺
阅读(1870)
评论(1)
推荐(0)
2012年8月28日
QT两个字符串转化函数,避免文字乱码。
摘要: 比如,从文件中读出来的乱码,用QStringQString::fromLocal8Bit(constchar*str,intsize=-1)保证显示正确。比如,写入文件的时候乱码,用QByteArrayQString::toLocal8Bit()const保证写入不会乱码。
阅读全文
posted @ 2012-08-28 14:38 奥雷连诺
阅读(160)
评论(0)
推荐(0)
2012年7月25日
QT线程初次使用。遇到的问题。
摘要: #includeclassOpenProThread:publicQThread{Q_OBJECTpublic:OpenProThread(QObject*parent=0){}~OpenProThread(){}protected:virtualvoidrun(){//……//你的操作//……}...
阅读全文
posted @ 2012-07-25 11:33 奥雷连诺
阅读(264)
评论(0)
推荐(0)
2012年7月3日
QT的一个奇怪问题,设置了Qt::Tool后,点击弹出对话框的确定取消按钮,程序直接退出。
摘要: Alright,Ifoundthereason.QWidget::create()clearstheQt::WA_QuitOnCloseattributeforanythingbutQt::Window,Qt::WidgetorQt::Dialog.Theworkaroundistocallfor...
阅读全文
posted @ 2012-07-03 14:13 奥雷连诺
阅读(401)
评论(0)
推荐(0)
2012年5月23日
得到弹出菜单QMenu的高度
摘要: void xxxClass::xxxFun(){ m_StartMenu->addAction(act); m_StartMenu->addSeparator(); //如果没有这句,得到的sumHeight是菜单项的值;有了这句得到就是菜单总的高度 //,很奇怪 int sigl...
阅读全文
posted @ 2012-05-23 17:19 奥雷连诺
阅读(197)
评论(0)
推荐(0)
2012年5月22日
QT 修改QTableWidget表头
摘要: void NodeConfigDlg::initNodeTable(){ m_pNodeTable = new QTableWidget(this); QStringList headerString; m_pNodeTable->setColumnCount(6); m_pNodeTab...
阅读全文
posted @ 2012-05-22 14:52 奥雷连诺
阅读(944)
评论(0)
推荐(0)
2012年5月4日
QT,QAction中的ToolTip
摘要: QAction ( const QString & text, QObject * parent )QAction ( const QIcon & icon, const QString & text, QObject * parent )QAction的两个构造函数中的text参数,文档的描述是...
阅读全文
posted @ 2012-05-04 10:42 奥雷连诺
阅读(594)
评论(0)
推荐(0)
2012年4月24日
VS2008工具,两种加入库的方法。 设置程序运行时目录
摘要: 方法一:整个编译器加入库tools->Projects and Solutions->VC++ Directories->右上角选择Library files加入D:\work\xerces-c\lib,将这里的库加入了vs2008的编译器中,对所有工程都适用。tools->Projects an...
阅读全文
posted @ 2012-04-24 14:31 奥雷连诺
阅读(430)
评论(0)
推荐(0)
库头文件的导入导出宏
摘要: xxx.h#ifdef CFG_API_BEING_COMPILED#ifdef WIN32#define CFG_API_EXPORT __declspec(dllexport)#else#define CFG_API_EXPORT#endif#else#if defined(WIN32)#de...
阅读全文
posted @ 2012-04-24 14:26 奥雷连诺
阅读(310)
评论(0)
推荐(0)
上一页
1
···
8
9
10
11
12
13
14
15
16
···
18
下一页
公告