[Development] cmake for Qt

2013-03-11 Thread
Hello This is my first to compile qt project use cmake. I written CmakeLists.txt: PROJECT(test) CMAKE_MINIMUM_REQUIRED(VERSION 2.8) FIND_PACKAGE(Qt4 REQUIRED) INCLUDE(${QT_USE_FILE}) ADD_DEFINITIONS(${QT_DEFINITIONS}) SET(test_HEADERS widget.h comparefilethread.h) SET(test_SOURCES main.cpp

[Development] 答复: cmake mingw qt

2013-03-07 Thread
sorry, i figure out, i made some mistakes. thanks -Original Message- From: development-bounces+pengliang=founder@qt-project.org 代表 pengliang(彭亮) Sent: 2013-3-8 (星期五) 14:10 To: development@qt-project.org Subject: [Development] cmake mingw qt hello, my qt built by mingw, and now

[Development] cmake mingw qt

2013-03-07 Thread
hello, my qt built by mingw, and now, i want to create makefile use cmake. so, i run : cmake -G"MinGW Makefiles", and i get some error messages: CMake Error: Error: generator : MinGW Makefiles Does not match the generator used previously: Visual Studio 10 Either remove the CMakeCache.txt file or

[Development] 答复: 答复: 答复: [Qt-interest] QMultiHash

2013-03-07 Thread
-project.org [development-bounces+martin.smith=digia@qt-project.org] on behalf of pengliang(彭亮) [pengli...@founder.com] Sent: Thursday, March 07, 2013 12:51 PM To: Danny Koppel; pengliang(??); development@qt-project.org Subject: [Development] 答复: 答复: [Qt-interest] QMultiHash hi QMultiHash; it allow

[Development] 答复: 答复: [Qt-interest] QMultiHash

2013-03-07 Thread
hi QMultiHash; it allow you to insert some same keys, i have to find some string whether exist in the hash, if exist, then set values of hash to 0. my program is used to remove duplicate rows in two files. so, i read file1 to QMultiHashhash, qstring are content of rows, lon

[Development] 答复: [Qt-interest] QMultiHash

2013-03-07 Thread
Hi 1. QmultiHash replace() is only replace first item, I want to replace all values when key is matched. Qt docs : if there are multiple items with the key, the most recently inserted item's value is replaced with value. Who have a better method? 2. so I need to use Qmap, I found q

[Development] [Qt-interest] QMultiHash

2013-03-07 Thread
Hi All QMultiHashhh; I need to find some key and change their values. I found If I use QmutableHashIteratorit , its bool findNext ( const T & value ) Its parameter is a value, not a key. So I need to : While(it.hasNext()) { It.next(); If(it.key() == ikey) { It.setValue(ivalue); }

[Development] important:qt connect mssql on linux

2012-10-09 Thread
Hi list, I have compiled libqsqlodbc.so on redhat64bit successfully. When I run the snippets bellow some error message occurred. QString Dsn = QString::fromLocal8Bit("Driver={sql server};server=172.2.2.2;database=Live;uid=an;pwd=an;"); QSqlDatabase::addDatabase("QODBC"); Error