Qt_Notes

来源:互联网 发布:淘宝商城注册流程 编辑:程序博客网 时间:2024/06/05 08:07

Common

Connect 

Function define is enough, Do not add argument name.

SIGNAL(finished(QNetworkReply* reply))->

SIGNAL(finished(QNetworkReply*))

---Common End---

Installation 

>Building

http://doc.qt.nokia.com/latest/install-win.html 

configure -platform win32-msvc2010 (or linux-g++-64) 

nmake

nmake confclean


Needs 

>ActivePerl 

for script running 

>Visual Studio 

command nmake or make 

>Build in VS2010 command prompt

if we use VS2008 it might cause some problems when we link to the Qt libraries because the compatibility issue.

x64 binary building: still use win32-msvc(spec)

 

Source download 

http://get.qt.nokia.com/qt/source/ 

---Installation End---


QtCreator 

QMake 

http://developer.qt.nokia.com/doc/qt-4.8/qmake-manual.html 

>Project setting

win32 {SOURCES += hellowin.cpp}

unix {SOURCES += hellounix.cpp}

macx{QMAKE_LFLAGS+=-install_name@executable_path/$$join(TARGET,,lib,.dylib)}


Tips

>RESOURCES need explicit path

-example

TEMPLATE = app

CONFIG += qt debug_and_release stl

QT += declarative

isEmpty(SOURCE_PATH) {

        SOURCE_PATH = ../AdNotificationUI

}

INCLUDEPATH += \

        . \

        $${SOURCE_PATH} \

        $${SOURCE_PATH}/res \

        $${SOURCE_PATH}/res/Image \

DEPENDPATH += \

        $${SOURCE_PATH} \

SOURCES += main.cpp NotificationHubContext.cpp

HEADERS += NotificationHubContext.h

RESOURCES += ../AdNotificationUI/res/AdNotificationUI.qrc

---QtCreator End---

原创粉丝点击