1.linuxä¸qtcreateä¸ç»ä»¶å¨åª
2.qt-everywhere-opensource-src-4.8.5è¿ä¸ªå
å«qt createå
3.linuxä¸å¦ä½è¿è¡qtç¨åº
4.å¦ä½å©ç¨QTcreator å¼åWtç¨åº
5.Qt Creator 4.8.0 中文乱码 与 Qt 不能Debug问题的源码解决
linuxä¸qtcreateä¸ç»ä»¶å¨åª
å¨QtCreatorä¸ï¼ç»ä»¶ï¼å³æ§ä»¶Widgetï¼æ¯ç¨æ¥å建ç¨æ·çé¢çåºæ¬å ç´ ãå¯ä»¥å¨QtCreatorçå·¥å ·ç®±ä¸æ¾å°ææçç»ä»¶ã
å·¥å ·ç®±ä½äºQtCreatorç左侧ï¼æ¯ä¸ä¸ªé¢æ¿çªå£ãå¯ä»¥éè¿åå»âå·¥å ·ç®±âé项å¡æ¥æ¾ç¤ºå®ãå·¥å ·ç®±æä¾äºææå¯ç¨çæ§ä»¶éåï¼å¯ä»¥å°å®ä»¬ææ¾å°çé¢è®¾è®¡å¨ä¸ï¼ç¨äºå建çé¢ãå¨çé¢è®¾è®¡å¨æ¨¡å¼ä¸ï¼å¯ä»¥å¨å·¥å ·ç®±ä¸æ¾å°å¹¶éæ©éå½çç»ä»¶æ¥æ·»å å°çªä½ä¸ãä¸æ¦å建äºä¸ä¸ªç»ä»¶ï¼å¯ä»¥å¨å±æ§ç¼è¾å¨ä¸è¿ä¸æ¥æ·»å åä¿®æ¹ç»ä»¶çå±æ§ï¼ä¾å¦å ¶å¤§å°ãä½ç½®ãææ¬ççã
å¦æå·¥å ·ç®±ä¸æäºç»ä»¶æ²¡æå¨QtCreatorä¸æ¾ç¤ºï¼é£ä¹éè¦ç¡®ä¿QtCreatorçæ¬ä¸å®è£ äºç¸åºçç»ä»¶åºï¼ä¾å¦QtWidgetsãQtQuickççãå¦æéè¦å®è£ ç»ä»¶åºï¼å¯ä»¥å¨QtCreatorä¸éæ©âèåæ â->â帮å©â->âå ³äºæ件âï¼å¨æ¾ç¤ºçæ件å表ä¸å¾ééè¦å®è£ çæ件并ç¹å»âå®è£ âãå®æå®è£ åï¼å次å¯å¨QtCreatorå³å¯å¨å·¥å ·ç®±ä¸çå°è¿äºæ°çç»ä»¶ã
qt-everywhere-opensource-src-4.8.5è¿ä¸ªå å«qt createå
ä¸é¢æ¯ç¼è¯é项,èªå·±å¯ä»¥ä¿®ä¿®æ¹æ¹./configure-opensource-embeddedarm-xplatformqws/linux-arm-gnueabi-g++-no-webkit-qt-libtiff-qt-libmng-qt-libjpeg-qt-libpng-no-qt3support-nomakedemos-nomakedocs-nomakeexamples-little-endian-host-little-endian-no-xcursor-no-mouse-linuxtp-qt-mouse-tslib-I/usr/local/tslib/include-L/usr/local/tslib/lib-fast-lrt-confirm-licensePS:å¨è§£åå çmkspecs/linux-arm-gnueabi-g++ç®å½ä¸éè¦é ç½®ä¸ä¸ä½ çlinux-arm-gnueabi-g++è·¯å¾,æ好æ¯è®¾ç½®æç»å¯¹è·¯å¾,å¦åå¯è½ä½ é ç½®ç交åç¼è¯å¨æ²¡ææ·»å å°ç¯å¢åééé¢ä¸å¥½~(å¦æé ç½®äºç¯å¢åéçè¯,é£å°±æ²¡å¿ è¦è®¾ç½®äº)æçç»ä½ åèä¸ä¸,å°±æ¯åé äº~##qmakeconfigurationforbuildingwitharm-linux-gnueabi-g++#MAKEFILE_GENERATOR=UNIXTARGET_PLATFORM=unixTEMPLATE=appCONFIG+=qtwarn_onreleaseincrementallink_prlgdb_dwarf_indexQT+=coreguiQMAKE_INCREMENTAL_STYLE=sublibinclude(../common/linux.conf)include(../common/gcc-base-unix.conf)include(../common/g++-unix.conf)#modificationstog++.confQMAKE_CC=arm-linux-gnueabi-gccQMAKE_CXX=arm-linux-gnueabi-g++QMAKE_LINK=arm-linux-gnueabi-g++QMAKE_LINK_SHLIB=arm-linux-gnueabi-g++#modificationstolinux.confQMAKE_AR=arm-linux-gnueabi-arcqsQMAKE_OBJCOPY=arm-linux-gnueabi-objcopyQMAKE_STRIP=arm-linux-gnueabi-stripload(qt_config)æ¥ä¸æ¥æ¯QTCREATEé ç½®å·¥å ·-->é项--->æ建åè¿è¡1.ç¼è¯å¨:ç¹å»æ·»å :"å称"éæ"ç¼è¯å¨è·¯å¾"**/arm-none-linux-gnueabi-g++æ¾å°ä½ çç¼è¯å¨,æè¿éæ¯ç¨ARMçå ¶ä»ä¸å¡«ä¹è¡.2.QtVersions:ç¹å»æ·»å :æ¾å°éè¿æºç ç¼è¯å¥½çqmakeæ件.ä¾å¦:/usr/local/Qt-4.8.6/bin/qmake3.æ建å¥ä»¶:ç¹å»æ·»å :"å称"éæ,éç¹æ¯"ç¼è¯å¨"è·"QTçæ¬",åå«éæ©ååæ·»å ç两项.è°è¯å¨:å¦ææ¯æ¡é¢ç¯å¢é£å°±éæ¡é¢ç,å¦ææ¯å¨åµå ¥å¼ä¸ç,é£ä¸è¦ä¹å¯ä»¥..
linuxä¸å¦ä½è¿è¡qtç¨åº
å¾å½¢çé¢ä¸ï¼ç´æ¥ä¸è½½qtcreateï¼libqt4-devï¼qt5defaule-dev 第ä¸ä¸ªæ¯ç¼è¾è½¯ä»¶ï¼å两个æ¯åºï¼å¦éå ¶ä»å¦å¤æ¾ãå½ä»¤è¡æ¨¡å¼çè¯ï¼ä¸ç¥éæä¹å¨æ²¡æå¾å½¢çé¢ä¸è¿è¡å¯¹è¯æ¡çç¨åºï¼å½ä»¤è¡æ¨¡å¼è¿è¡qtå½ä»¤è¡æ ¼å¼ç,ç´æ¥qmake,makeãå°±å¯ä»¥äºãéé¢é£ä¸ªæ²¡æåç¼çå°±æ¯è¿è¡ç¨åºäºï¼./ç¨åºå è¿è¡ ä¸è¡å°±å æé chmod +x ***.
å¦ä½å©ç¨QTcreator å¼åWtç¨åº
ä»ä¸ä¸ªç®åçhellowordå¼å§å§
proæ件
#-------------------------------------------------
#
# Project created by QtCreator --T::
#
#-------------------------------------------------
QT -= core
QT -= gui
TARGET = hello.wt
LIBS += -L/usr/local/lib -lwt -lwthttp
CONFIG += console
CONFIG -= app_bundle
TEMPLATE = app
SOURCES += main.cpp
main.cpp
#include <Wt/WApplication>
#include <Wt/WBreak>
#include <Wt/WContainerWidget>
#include <Wt/WLineEdit>
#include <Wt/WPushButton>
#include <Wt/WText>
#include <boost/version.hpp>
using namespace Wt;
/
** A simple hello world application class which demonstrates how to react
* to events, read input, and give feed-back.
*/
class HelloApplication : public WApplication
{
public:
HelloApplication(const WEnvironment& env);
private:
WLineEdit *nameEdit_;
WText *greeting_;
void greet();
};
/
** The env argument contains information about the new session, and
* the initial request. It must be passed to the WApplication
* constructor so it is typically also an argument for your custom
* application constructor.
*/
HelloApplication::HelloApplication(const WEnvironment& env)
: WApplication(env)
{
setTitle("Hello"); // application title
root()->addWidget(new WText("Your name, please ? ")); // show some text
nameEdit_ = new WLineEdit(root()); // allow text input
nameEdit_->setFocus(); // give focus
WPushButton *b = new WPushButton("Greet me.", root()); // create a button
b->setMargin(5, Left); // add 5 pixels margin
root()->addWidget(new WBreak()); // insert a line break
greeting_ = new WText(root()); // empty text
/
** Connect signals with slots
*
* - simple Wt-way
*/
b->clicked().connect(this, &HelloApplication::greet);
/
** - using an arbitrary function object (binding values with boost::bind())
*/
nameEdit_->enterPressed().connect
(boost::bind(&HelloApplication::greet, this));
}
void HelloApplication::greet()
{
/
** Update the text, using text input into the nameEdit_ field.
*/
greeting_->setText("Hello there, " + nameEdit_->text());
}
WApplication *createApplication(const WEnvironment& env)
{
/
** You could read information from the environment to decide whether
* the user has permission to start a new application
*/
return new HelloApplication(env);
}
int main(int argc, char **argv)
{
/
** Your main method may set up some shared resources, but should then
* start the server application (FastCGI or httpd) that starts listening
* for requests, and handles all of the application life cycles.
*
* The last argument to WRun specifies the function that will instantiate
* new application objects. That function is executed when a new user surfs
* to the Wt application, and after the library has negotiated browser
* support. The function should return a newly instantiated application
* object.
*/
return WRun(argc, argv, &createApplication);
}
è¿å°±æ¯helloword çå·¥ç¨æ件
ç°å¨ç¼è¯è¯å®æ¯æ æ³è¿è¡ç
ç¶åå¨è¿è¡ç¯å¢ä¸æ·»å wtçå ±äº«åºå°å å¥½äº ç°å¨æå¼æµè§å¨ è¾å ¥0.0.0.0: ç¹å»ç¼è¯è¿è¡
æå ï¼è¿æ ·å¼åèµ·æ¥æçä¸ç¥éé«åºnåå§ï¼è¯¶ï¼ä¸ç¥éwt ä»ä¹æ¶åæè½å¨å½å æ®åå¢
Qt Creator 4.8.0 中文乱码 与 Qt 不能Debug问题的解决
在Qt Creator 4.8.0中遇到的中文乱码和调试问题,需要分别针对源代码和界面进行处理。源码对于源代码的源码中文乱码,可以采取以下步骤:
1. 打开编辑菜单,源码moba手机游戏源码选择“switch Encoding”将文件编码转换为UTF-8,源码确保代码的源码问答社区 开源源码中文字符正确显示。
2. 在工具菜单中,源码进入“选项”->“文本编辑器”->“行为”,源码将默认编码设为UTF-8,源码同时取消BOM(Byte Order Mark)选项,源码以避免编码冲突。源码
对于Qt界面的源码中文显示问题,确保代码源文件编码已经设置为UTF-8,源码安卓自动登录源码然后在main()函数中添加适当的源码字符编码处理代码,以确保中文录入时的源码正确显示。
至于Qt Creator的静态h5源码调试问题,如果遇到“Unable to create a debugging engine.”的错误,如果使用的是Visual Studio 编译套件,可以尝试以下步骤解决:
1. 找到Visual Studio 的手游现在平台源码安装路径,进入“应用和功能”。
2. 选择安装的Visual Studio ,点击“修改”选项。
3. 在弹出的窗口中,重新安装Windows SDK和相关工具。
4. 安装完成后,重启Qt Creator,这通常能解决调试器的连接问题。