上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 18 下一页
摘要: 使用VS2010建立C++解决方案时,会生成SolutionName.sdf和一个叫做ipch的文件夹,这两个文件再加上*.pch等文件使得工程变得非常的庞大。本文介绍两种方法使得在vs2010中不产生.sdf和ipch文件 方法一:Tools->Options->Text Editor->C/C... 阅读全文
posted @ 2013-03-29 19:30 奥雷连诺 阅读(244) 评论(0) 推荐(0)
摘要: 在项目中遇到了这样的问题,是在使用过滤模型的时候。。在更新模型的时候,当过滤模型删除重新new,而源模型没有重新new后,使用setColumnWidth(intcolumn,intwidth),;就会不起作用。后来我试着不再重新new过滤模型,setColumnWidth就可以使用了。难道过滤模... 阅读全文
posted @ 2013-03-01 13:45 奥雷连诺 阅读(1268) 评论(0) 推荐(0)
摘要: QTableViewm_pTable;m_pTable->horizontalHeader()->setResizeMode(QHeaderView::ResizeToContents); 阅读全文
posted @ 2012-11-06 15:18 奥雷连诺 阅读(715) 评论(0) 推荐(0)
摘要: 我在QMainWindow上加了两个工具条,当在工具条上点击右键时会出现菜单,点击菜单会隐藏工具条或者是出现工具条,想在工具条上点击右键是不能让它弹出菜单,QMainWindow的设置this->setContextMenuPolicy(Qt::NoContextMenu); 阅读全文
posted @ 2012-11-05 11:47 奥雷连诺 阅读(1842) 评论(0) 推荐(0)
摘要: 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)
摘要: QWidget*widget=newQWidget(mainWindow);widget->setLayout(gridLayout);mainWindow->setCentralWidget(widget); 阅读全文
posted @ 2012-09-27 10:14 奥雷连诺 阅读(465) 评论(1) 推荐(0)
摘要: m_pTreeList->header()->setHidden(true);m_pTreeList->header()->setHorizontalScrollMode(QAbstractItemView::ScrollPerPixel);m_pTreeList->header()->setRe... 阅读全文
posted @ 2012-09-27 10:13 奥雷连诺 阅读(1870) 评论(1) 推荐(0)
摘要: 比如,从文件中读出来的乱码,用QStringQString::fromLocal8Bit(constchar*str,intsize=-1)保证显示正确。比如,写入文件的时候乱码,用QByteArrayQString::toLocal8Bit()const保证写入不会乱码。 阅读全文
posted @ 2012-08-28 14:38 奥雷连诺 阅读(160) 评论(0) 推荐(0)
摘要: #includeclassOpenProThread:publicQThread{Q_OBJECTpublic:OpenProThread(QObject*parent=0){}~OpenProThread(){}protected:virtualvoidrun(){//……//你的操作//……}... 阅读全文
posted @ 2012-07-25 11:33 奥雷连诺 阅读(264) 评论(0) 推荐(0)
摘要: Alright,Ifoundthereason.QWidget::create()clearstheQt::WA_QuitOnCloseattributeforanythingbutQt::Window,Qt::WidgetorQt::Dialog.Theworkaroundistocallfor... 阅读全文
posted @ 2012-07-03 14:13 奥雷连诺 阅读(401) 评论(0) 推荐(0)
摘要: void xxxClass::xxxFun(){ m_StartMenu->addAction(act); m_StartMenu->addSeparator(); //如果没有这句,得到的sumHeight是菜单项的值;有了这句得到就是菜单总的高度 //,很奇怪 int sigl... 阅读全文
posted @ 2012-05-23 17:19 奥雷连诺 阅读(197) 评论(0) 推荐(0)
摘要: 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)
摘要: 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)
摘要: 方法一:整个编译器加入库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 下一页