锘??xml version="1.0" encoding="utf-8" standalone="yes"?>精品无码人妻久久久久久,久久综合丁香激情久久,久久久久久精品久久久久http://www.shnenglu.com/biao/category/9973.html 鎴戜笉鑱槑錛屼絾鎴戜細寰堝姫鍔?/description>zh-cnTue, 15 Oct 2013 13:24:59 GMTTue, 15 Oct 2013 13:24:59 GMT60Qt錛氱紪鐮佽寖鍥?/title><link>http://www.shnenglu.com/biao/archive/2013/10/15/203755.html</link><dc:creator>閫涘鐨勮湕鐗?/dc:creator><author>閫涘鐨勮湕鐗?/author><pubDate>Tue, 15 Oct 2013 12:45:00 GMT</pubDate><guid>http://www.shnenglu.com/biao/archive/2013/10/15/203755.html</guid><wfw:comment>http://www.shnenglu.com/biao/comments/203755.html</wfw:comment><comments>http://www.shnenglu.com/biao/archive/2013/10/15/203755.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/biao/comments/commentRss/203755.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/biao/services/trackbacks/203755.html</trackback:ping><description><![CDATA[<div>緙栫爜鑼冨洿</div> <div>1. GBK (GB2312/GB18030)</div> <div>x00-xff GBK鍙屽瓧鑺傜紪鐮佽寖鍥?/div> <div>x20-x7f ASCII</div> <div>xa1-xff 涓枃</div> <div>x80-xff 涓枃</div> <div><br /> </div> <div>2. UTF-8 (Unicode)</div> <div>u4e00-u9fa5 (涓枃)</div> <div>x3130-x318F (闊╂枃)</div> <div>xAC00-xD7A3 (闊╂枃)</div> <div>u0800-u4e00 (鏃ユ枃)</div> <div>ps: 闊╂枃鏄ぇ浜嶽u9fa5]鐨勫瓧絎?/div> <div><br /> </div> <div>鏈夋椂鍊欐垜浠篃浼氱敤鍒板叏瑙掕嫳鏂囥佺壒孌婄鍙風瓑</div> <div>鍏ㄨ鑻辨枃鐨刄TF8鏄? uff21 – uff5a 錛屾槸浠庡ぇ鍐橝寮濮嬪埌灝忓啓鐨剒銆?/div> <div>utf8涓殑鍏ㄨ鏁板瓧鏄?uff10 – uff19 錛屽搴斿叧緋昏嚜鐒舵槸銆錛?– 錛?銆?/div> <div>utf8涓殑 uff01 鍒?uff09 鏄垜浠編寮忛敭鐩樹笂shift + 浠?鍒?閿笂鐨勭壒孌婄鍙楓?/div> <div><br /> </div> <div>utf8涓殑 uff20鏄疈, 瑕佹敞鎰忕殑鏄洜涓篅鏄?uff20錛屾墍浠?uff02 鏄弻寮曞彿錛?/div> <div>6鐨?#8230;…鏄袱涓鍙風殑緇勫悎錛?/div> <div>涔熷氨鏄ff06鏄紗錛?ff09鏄?錛夈?/div> <div><br /> </div> <div>姝e垯渚嬪瓙錛堜嬌鐢≒HP錛?</div> <div>preg_replace(“/([x80-xff])/”,”",$str); //GBK涓尮閰?/div> <div>preg_replace(“/([u4e00-u9fa5])/”,”",$str); //UTF8涓尮閰?/div> <div><br /> </div> <div>杞澆鍦板潃錛歨ttp://blog.csdn.net/sjw890821sjw/article/details/7004474</div> @import url(http://www.shnenglu.com/CuteSoft_Client/CuteEditor/Load.ashx?type=style&file=SyntaxHighlighter.css);@import url(/css/cuteeditor.css);<img src ="http://www.shnenglu.com/biao/aggbug/203755.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/biao/" target="_blank">閫涘鐨勮湕鐗?/a> 2013-10-15 20:45 <a href="http://www.shnenglu.com/biao/archive/2013/10/15/203755.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>Qt錛歐indows Qt 鍘繪帀閫変腑鐨勮櫄綰挎http://www.shnenglu.com/biao/archive/2013/09/03/202977.html閫涘鐨勮湕鐗?/dc:creator>閫涘鐨勮湕鐗?/author>Mon, 02 Sep 2013 19:19:00 GMThttp://www.shnenglu.com/biao/archive/2013/09/03/202977.htmlhttp://www.shnenglu.com/biao/comments/202977.htmlhttp://www.shnenglu.com/biao/archive/2013/09/03/202977.html#Feedback0http://www.shnenglu.com/biao/comments/commentRss/202977.htmlhttp://www.shnenglu.com/biao/services/trackbacks/202977.htmlclass myStyle: public QProxyStyle
{
public:
   myStyle(QStyle *baseStyle)
       : QProxyStyle(baseStyle)
   {
   }

   void drawPrimitive(PrimitiveElement element,
       const QStyleOption *option,
       QPainter *painter,
       const QWidget *widget = 0) const
   {
       if (element == QStyle::PE_FrameFocusRect)
           return;
       QProxyStyle::drawPrimitive(element, option, painter, widget);
   }
};  @import url(http://www.shnenglu.com/CuteSoft_Client/CuteEditor/Load.ashx?type=style&file=SyntaxHighlighter.css);@import url(/css/cuteeditor.css);

]]>
Qt錛氬畾鍒秖Debug絳夎緭鍑虹殑鏍煎紡http://www.shnenglu.com/biao/archive/2013/09/02/202956.html閫涘鐨勮湕鐗?/dc:creator>閫涘鐨勮湕鐗?/author>Mon, 02 Sep 2013 09:48:00 GMThttp://www.shnenglu.com/biao/archive/2013/09/02/202956.htmlhttp://www.shnenglu.com/biao/comments/202956.htmlhttp://www.shnenglu.com/biao/archive/2013/09/02/202956.html#Feedback0http://www.shnenglu.com/biao/comments/commentRss/202956.htmlhttp://www.shnenglu.com/biao/services/trackbacks/202956.html

void testMessagePattern() {
    QString QT_MESSAGE_PATTERN=
            "[%{if-debug}D%{endif}%{if-warning}W%{endif}%{if-critical}C%{endif}%{if-fatal}F%{endif}]"
            ": %{file}:%{line} - %{message}";
    qSetMessagePattern(QT_MESSAGE_PATTERN);

    qDebug() << "Hello Pattern";
    qDebug() << QString("榛勫姜").toUtf8().toHex();
}

[D]: /Users/Biao/Dropbox/workspace/Qt/Test/main.cpp:26 - Hello Pattern

[D]: /Users/Biao/Dropbox/workspace/Qt/Test/main.cpp:28 - "e9bb84e5bdaa"


void qSetMessagePattern(const QString & pattern)

Changes the output of the default message handler.

Allows to tweak the output of qDebug(), qWarning(), qCritical() and qFatal().

Following placeholders are supported:

PlaceholderDescription
%{appname} QCoreApplication::applicationName()
%{file} Path to source file
%{function} Function
%{line} Line in source file
%{message} The actual message
%{pid} QCoreApplication::applicationPid()
%{threadid} ID of current thread
%{type} "debug", "warning", "critical" or "fatal"

You can also use conditionals on the type of the message using %{if-debug}%{if-warning}%{if-critical} or %{if-fatal} followed by an %{endif}. What is inside the%{if-*} and %{endif} will only be printed if the type matches.

Example:

QT_MESSAGE_PATTERN="[%{if-debug}D%{endif}%{if-warning}W%{endif}%{if-critical}C%{endif}%{if-fatal}F%{endif}] %{file}:%{line} - %{message}"

The default pattern is "%{message}".

The pattern can also be changed at runtime by setting the QT_MESSAGE_PATTERN environment variable; if both qSetMessagePattern() is called and QT_MESSAGE_PATTERN is set, the environment variable takes precedence.

qSetMessagePattern() has no effect if a custom message handler is installed.

This function was introduced in QtCore 5.0.

See also qInstallMessageHandler() and Debugging Techniques.




]]>
Qt錛氱粰QWidget娣誨姞shadow鏁堟灉http://www.shnenglu.com/biao/archive/2013/09/02/202949.html閫涘鐨勮湕鐗?/dc:creator>閫涘鐨勮湕鐗?/author>Mon, 02 Sep 2013 07:19:00 GMThttp://www.shnenglu.com/biao/archive/2013/09/02/202949.htmlhttp://www.shnenglu.com/biao/comments/202949.htmlhttp://www.shnenglu.com/biao/archive/2013/09/02/202949.html#Feedback0http://www.shnenglu.com/biao/comments/commentRss/202949.htmlhttp://www.shnenglu.com/biao/services/trackbacks/202949.html

Widget::Widget(QWidget *parent) : QWidget(parent),
    ui(new Ui::Widget), data(new WidgetPrivate) {
    ui->setupUi(this);

    QGraphicsBlurEffect *effect = new QGraphicsBlurEffect(this);
    effect->setBlurRadius(1.5);

    QGraphicsDropShadowEffect *shadowEffect = new QGraphicsDropShadowEffect(this);
    shadowEffect->setBlurRadius(5);
    shadowEffect->setXOffset(2);
    shadowEffect->setYOffset(2);

    ui->checkBox->setGraphicsEffect(shadowEffect);
}



]]>
Qt錛歈_DECLARE_METATYPE鍜宷RegisterMetaTypehttp://www.shnenglu.com/biao/archive/2013/09/02/202948.html閫涘鐨勮湕鐗?/dc:creator>閫涘鐨勮湕鐗?/author>Mon, 02 Sep 2013 07:16:00 GMThttp://www.shnenglu.com/biao/archive/2013/09/02/202948.htmlhttp://www.shnenglu.com/biao/comments/202948.htmlhttp://www.shnenglu.com/biao/archive/2013/09/02/202948.html#Feedback0http://www.shnenglu.com/biao/comments/commentRss/202948.htmlhttp://www.shnenglu.com/biao/services/trackbacks/202948.html
Adding a Q_DECLARE_METATYPE() makes the type known to all template based functions, including QVariant.
Note that if you intend to use the type in queued signal and slot connections or in QObject's property system,
you also have to call qRegisterMetaType() since the names are resolved at runtime.

class BH {
public:
    BH() {
        value = 10;
    }

    int value;
};

Q_DECLARE_METATYPE(BH)

BH bh;
QVariant var = QVariant::fromValue(bh);

qDebug() << var.canConvert<BH>();

BH bh2 = var.value<BH>();
qDebug() << bh2.value;



]]>
Qt錛氱粯鍒跺甫楂樺厜鐨勬寜閽?/title><link>http://www.shnenglu.com/biao/archive/2013/08/07/202387.html</link><dc:creator>閫涘鐨勮湕鐗?/dc:creator><author>閫涘鐨勮湕鐗?/author><pubDate>Tue, 06 Aug 2013 23:32:00 GMT</pubDate><guid>http://www.shnenglu.com/biao/archive/2013/08/07/202387.html</guid><wfw:comment>http://www.shnenglu.com/biao/comments/202387.html</wfw:comment><comments>http://www.shnenglu.com/biao/archive/2013/08/07/202387.html#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://www.shnenglu.com/biao/comments/commentRss/202387.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/biao/services/trackbacks/202387.html</trackback:ping><description><![CDATA[@import url(http://www.shnenglu.com/CuteSoft_Client/CuteEditor/Load.ashx?type=style&file=SyntaxHighlighter.css);@import url(/css/cuteeditor.css); <img src="http://www.shnenglu.com/images/cppblog_com/biao/Button.png" width="403" height="383" alt="" />  <div><br /> <div> <div style="background-color: #eeeeee; font-size: 13px; border-left-color: #cccccc; padding: 4px 5px 4px 4px; width: 98%; word-break: break-all; "><!--<br /> <br /> Code highlighting produced by Actipro CodeHighlighter (freeware)<br /> http://www.CodeHighlighter.com/<br /> <br /> --><span style="color: #0000FF; ">void</span> Widget::paintEvent(QPaintEvent *) {<br />     QPainter painter(<span style="color: #0000FF; ">this</span>);<br />     painter.translate(width() / 2, height() / 2);<br />     painter.setRenderHint(QPainter::Antialiasing);<br />     painter.setPen(Qt::transparent);<br />     painter.fillRect(-width(), -height(), width() * 2, height() * 2, Qt::gray);<br /> <br />     <span style="color: #0000FF; ">int</span> radius = 100;<br /> <br />     <span style="color: #008000; ">//</span><span style="color: #008000; "> 澶栬竟妗?/span><span style="color: #008000; "><br /> </span>    QLinearGradient lg1(0, -radius, 0, radius);<br />     lg1.setColorAt(0, QColor(255, 255, 255));<br />     lg1.setColorAt(1, QColor(166, 166, 166));<br />     painter.setBrush(lg1);<br />     painter.drawEllipse(-radius, -radius, radius << 1, radius << 1);<br /> <br />     <span style="color: #008000; ">//</span><span style="color: #008000; "> 鍐呰竟妗?/span><span style="color: #008000; "><br /> </span>    radius -= 13;<br />     QLinearGradient lg2(0, -radius, 0, radius);<br />     lg2.setColorAt(0, QColor(155, 155, 155));<br />     lg2.setColorAt(1, QColor(255, 255, 255));<br />     painter.setBrush(lg2);<br />     painter.drawEllipse(-radius, -radius, radius << 1, radius << 1);<br /> <br />     <span style="color: #008000; ">//</span><span style="color: #008000; "> 鍐呴儴鐨勫渾</span><span style="color: #008000; "><br /> </span>    radius -= 4;<br />     QRadialGradient rg(0, 0, radius);<br />     rg.setColorAt(0, QColor(245, 0, 0));<br />     rg.setColorAt(0.6, QColor(210, 0, 0));<br />     rg.setColorAt(1, QColor(140, 0, 0));<br />     painter.setBrush(rg);<br />     painter.drawEllipse(-radius, -radius, radius << 1, radius << 1);<br /> <br />     <span style="color: #008000; ">//</span><span style="color: #008000; "> 楂樺厜</span><span style="color: #008000; "><br /> </span>    radius -= 3;<br />     QPainterPath path;<br />     path.addEllipse(-radius, -radius - 2, radius << 1, radius << 1);<br />     QPainterPath bigEllipse;<br /> <br />     radius *= 2;<br />     bigEllipse.addEllipse(-radius, -radius + 140, radius << 1, radius << 1);<br />     path -= bigEllipse;<br /> <br />     QLinearGradient lg3(0, -radius / 2, 0, 0);<br />     lg3.setColorAt(0, QColor(255, 255, 255, 220));<br />     lg3.setColorAt(1, QColor(255, 255, 255, 30));<br />     painter.setBrush(lg3);<br />     painter.drawPath(path);<br /> }</div> </div> </div><img src ="http://www.shnenglu.com/biao/aggbug/202387.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/biao/" target="_blank">閫涘鐨勮湕鐗?/a> 2013-08-07 07:32 <a href="http://www.shnenglu.com/biao/archive/2013/08/07/202387.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>Qt錛欶ontMetricshttp://www.shnenglu.com/biao/archive/2013/08/03/202322.html閫涘鐨勮湕鐗?/dc:creator>閫涘鐨勮湕鐗?/author>Sat, 03 Aug 2013 10:27:00 GMThttp://www.shnenglu.com/biao/archive/2013/08/03/202322.htmlhttp://www.shnenglu.com/biao/comments/202322.htmlhttp://www.shnenglu.com/biao/archive/2013/08/03/202322.html#Feedback0http://www.shnenglu.com/biao/comments/commentRss/202322.htmlhttp://www.shnenglu.com/biao/services/trackbacks/202322.html鍦ㄤ竴涓猂ect鐨勬涓棿緇樺埗鏂囨湰: rect鐨勪腑鐐逛笌鏂囨湰鐨勪腑鐐歸噸鍚?
int cx = rect.x + rect.width / 2;
int fx = cx - fm.width(text);

int cy = rect.y + rect.height / 2;
int fy = cy + fm.xHeight / 2;



@import url(http://www.shnenglu.com/CuteSoft_Client/CuteEditor/Load.ashx?type=style&file=SyntaxHighlighter.css);@import url(/css/cuteeditor.css);

]]>
Mac錛歁ac涓嬪畨瑁匬HP, MySql寮鍙戠幆澧?/title><link>http://www.shnenglu.com/biao/archive/2013/08/03/202319.html</link><dc:creator>閫涘鐨勮湕鐗?/dc:creator><author>閫涘鐨勮湕鐗?/author><pubDate>Sat, 03 Aug 2013 02:24:00 GMT</pubDate><guid>http://www.shnenglu.com/biao/archive/2013/08/03/202319.html</guid><wfw:comment>http://www.shnenglu.com/biao/comments/202319.html</wfw:comment><comments>http://www.shnenglu.com/biao/archive/2013/08/03/202319.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/biao/comments/commentRss/202319.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/biao/services/trackbacks/202319.html</trackback:ping><description><![CDATA[鏈綆鍗曠殑涓や釜閫夋嫨: XAMPP, MAMP <div>閮介泦鎴愪簡 <span style="color: red; ">MySql + PhpMyAdmin </span>+ PHP 寮鍙戠幆澧冿紝寤虹珛寮鍙戠幆澧冪畝鍗曪紙閮藉彧闇瑕佸畨瑁呬竴涓▼搴忥級銆?/div> <div>濡傛灉鍗曠嫭鐨勫畨瑁匨ySql錛孭hpMyAdmin錛孭HP寮鍙戠幆澧冿紝浼氶夯鐑﹀緢澶氥?/div> <div><br /> <div><span style="color: red; ">XAMPP</span>: 鎻愪緵澶氬鉤鍙扮増鏈? Mac, Windows錛孡inux, Solaris錛屼絾鏄嚑涔庝笉鏇存柊浜嗭紝鐩稿MAMP鏉ヨ鏄撶敤鎬у氨宸偅涔堜竴鐐圭偣銆?/div> <div>涓嬭澆鍦板潃錛?a >http://www.apachefriends.org/zh_cn/xampp.html</a></div> <div><span style="color: red; "><br /> </span></div> <div><span style="color: red; ">MAMP</span>: 鍙兘榪愯浜嶮ac錛岀粡甯告洿鏂幫紝甯姪鏂囨。涓板瘜錛屾槗鐢ㄦф洿濂姐?/div> <div>涓嬭澆鍦板潃錛?a >http://www.mamp.info/en/index.html</a></div> <div><img src="http://www.shnenglu.com/images/cppblog_com/biao/MAMP.png" width="537" height="458" alt="" /><br /> </div> <div><img src="http://www.shnenglu.com/images/cppblog_com/biao/MAMP-Preferences.png" width="537" height="458" alt="" /><br /> </div> <div><br /> </div> </div><img src ="http://www.shnenglu.com/biao/aggbug/202319.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/biao/" target="_blank">閫涘鐨勮湕鐗?/a> 2013-08-03 10:24 <a href="http://www.shnenglu.com/biao/archive/2013/08/03/202319.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>Qt錛氭棤鏍囬鏍忔棤杈規紼嬪簭鐨勬嫋鍔ㄥ拰鏀瑰彉澶у皬http://www.shnenglu.com/biao/archive/2013/07/11/201704.html閫涘鐨勮湕鐗?/dc:creator>閫涘鐨勮湕鐗?/author>Thu, 11 Jul 2013 11:45:00 GMThttp://www.shnenglu.com/biao/archive/2013/07/11/201704.htmlhttp://www.shnenglu.com/biao/comments/201704.htmlhttp://www.shnenglu.com/biao/archive/2013/07/11/201704.html#Feedback0http://www.shnenglu.com/biao/comments/commentRss/201704.htmlhttp://www.shnenglu.com/biao/services/trackbacks/201704.htmlFrom: http://blog.csdn.net/kfbyj/article/details/9284923


鏈榪戝仛欏圭洰閬囧埌鐨勯棶棰橈紝鎬葷粨涓嬨?/span>

鏈夋椂鍊欐垜浠寰楃郴緇熺殑鏍囬鏍忓拰鎸夐挳澶笐澶憜鏉匡紝鎯沖仛鑷繁鐨勬爣棰樻爮浠ュ強鏈澶у寲銆佹渶灝忓寲銆佸叧闂紝鑿滃崟鎸夐挳錛屾垜浠氨闇瑕?nbsp;

  1. setWindowFlags(Qt::FramelessWindowHint);  
浣嗘槸榪欐牱榪囧悗錛屾垜浠氨涓嶈兘鎷栧姩紿楀彛鏀瑰彉浣嶇疆錛屼互鍙婃嫋鍔ㄨ竟緙樻敼鍙樼獥鍙eぇ灝忎簡銆?/span>

鏈変袱縐嶆柟妗堝鐞嗚繖縐嶆儏鍐碉細

1.鑷繁瀵筸ouseMoveEvent,mousePressEvent,mouseReleaseEvent 絳変簨浠惰繘琛屽鐞嗐?/p>

2.Qt鍙互澶勭悊windows鐨勬秷鎭傚ぇ瀹墮噸鏂板疄鐜癰ool winEvent(MSG *message, long *result);(鍦ㄦ鍙堜竴嬈℃劅瑙塓t鐨凬B)


鎴戝垰寮濮嬩嬌鐢ㄧ涓縐嶆柟娉曞幓瀹炵幇鐨勩傜Щ鍔ㄧ獥鍙e緢瀹規槗鍋氾紝澶у鍙互鍘葷湅鐪嬭繖涓ぇ澶у啓鐨勶紝姣旂綉涓婂叾浠栫増鏈棶棰樺皯浜涖?/p>

http://blog.csdn.net/aqtata/article/details/8902889

鍦ㄧ獥鍙h竟緙樻寜涓嬮紶鏍囨嫋鍔ㄦ敼鍙樼獥鍙eぇ灝忓氨姣旇緝楹葷儲浜嗐?/p>

鎴戞槸榪欐牱鍋氱殑錛?/p>

鍦╩ousePressEvent 鎸変笅璁劇疆m_bPressed涓虹湡銆?/p>

鍦╩ouseMoveEvent涓璵_bPressed涓虹湡涓攅vent->x() 鍦ㄧ獥鍙h竟緙?鍙婂鐞嗙畻鍑洪紶鏍囩Щ鍔ㄧ殑澧為噺 鐒跺悗涓嶆柇resize紿楀彛銆?br />

鑷充簬濡備綍涓鴻竟緙樼殑鏂畾錛屽氨鑷繁璁懼畾涓涓?宸?鍋囧 鍦ㄧ獥鍙h竟緙?±4涓猵x 灝辯畻鍦ㄥ湪璇ヨ竟緙樺氨澶勭悊璇esize銆?/p>

榪欐牱鍋氱己鐐瑰緢澶氾紝1.鎷栧揩浜嗕笉琛岋紝寰堝鏄撹秴榪囪宸?錛?2.紿楀彛鎶栧姩鐨勫帀瀹籌紝涓鐩村湪resize錛?.瑕佸鐞嗗お澶氭儏鍐?/p>


閴翠簬涓婅瘔緙虹偣浜庢槸涔庡氨鍒板闂漢鐧懼害google銆傛湁浜嗙浜岀鏂規硶錛?/p>

絎簩縐嶆柟娉曞緢濂界敤錛屾晥鏋滃拰鏈夋爣棰樿竟妗嗙▼搴忎竴鏍穨~~

Qt灞呯劧鍙互澶勭悊windows娑堟伅銆傘?/p>

榪欓噷鎴戜滑瑕侀噸鏂板疄鐜皐inEvent ( MSG * message, long * result ) 

璇ヨ櫄鍑芥暟鍦≦Widget鍜孮Wizard浠ュ強QSizeGrip浠ュ強浠栦滑鐨勫瓙綾諱腑閮藉彲浠ュ疄鐜般?/p>

濡傛灉浣犳兂鍋滄Qt澶勭悊娑堟伅灝辮繑鍥瀟rue錛屽茍涓旇緗畆esult鍒頒綘鎯寵淇濆瓨鐨勫艱繑鍥炵粰window澶勭悊銆傚惁鑰呯殑璇濊繑鍥瀎alse銆?/p>

榪欓噷鎴戜滑涓昏鎯沖鐞哤M_NCHITTEST娑堟伅銆?/p>

The WM_NCHITTEST message is sent to a window in order to determine what part of the window corresponds to a particular screen coordinate. This can happen, for example, when the cursor moves, when a mouse button is pressed or released, or in response to a call to a function such as WindowFromPoint. If the mouse is not captured, the message is sent to the window beneath the cursor. Otherwise, the message is sent to the window that has captured the mouse.

A window receives this message through its WindowProc function. 

WM_NCHITTEST鐨勬秷鎭搷搴斿嚱鏁頒細鏍規嵁榧犳爣褰撳墠鐨勫潗鏍囨潵鍒ゆ柇榧犳爣鍛戒腑浜嗙獥鍙g殑鍝釜閮ㄤ綅錛屾秷鎭搷搴斿嚱鏁扮殑榪斿洖鍊兼寚鍑轟簡閮ㄤ綅錛屼緥濡傚畠鍙兘浼氳繑鍥濰TCAPTION錛屾垨鑰匟TCLIENT絳夈傦紙鍏惰繑鍥炲兼湁寰堝錛岃鏌ラ槄MSDN錛夈?/span>

鐭ラ亾榪欎釜灝卞ソ浜嗭紝鎴戜滑榪樻槸瑕佸垽鏂笅榧犳爣鐨勪綅緗紝鐒跺悗閫氳繃璇ヤ綅緗繚瀛樺埌result緇檞indow澶勭悊銆?/p>

鍏跺疄灝辨槸鎴戜滑鐨勭▼搴忔病鏈夎竟妗嗕笉鑳藉彂閫佽繖浜涙秷鎭紝鎴戜滑鎶婂畠鍛婅瘔windows錛岀劧鍚巜indows甯垜浠鐞嗘嫋鍔紝鏀瑰彉澶у皬絳夋晥鏋溿傛墍浠ユ晥鏋滃拰鏈夎竟妗嗘湁鏍囬紼嬪簭鏁堟灉涓鏍風殑銆?/p>

澶存枃浠剁敵鏄庯細

  1. class MainWindow : public QMainWindow  
  2. {  
  3.     Q_OBJECT  
  4. public:  
  5.     MainWindow(QWidget *parent = 0);  
  6.     ~MainWindow();  
  7.   
  8. protected:  
  9.     bool winEvent(MSG *message, long *result);  
  10. };  
CPP瀹炵幇

  1. bool MainWindow::winEvent(MSG *message, long *result)  
  2. {  
  3.     switch(message->message)  
  4.     {  
  5.     case WM_NCHITTEST:  
  6.         int xPos = GET_X_LPARAM(message->lParam) - this->frameGeometry().x();  
  7.         int yPos = GET_Y_LPARAM(message->lParam) - this->frameGeometry().y();  
  8.         if(this->childAt(xPos,yPos) == 0)  
  9.         {  
  10.             *result = HTCAPTION;  
  11.         }else{  
  12.             return false;  
  13.         }  
  14.         if(xPos > 18 && xPos < 22)  
  15.             *result = HTLEFT;  
  16.         if(xPos > (this->width() - 22) && xPos < (this->width() - 18))  
  17.             *result = HTRIGHT;  
  18.         if(yPos > 18 && yPos < 22)  
  19.             *result = HTTOP;  
  20.         if(yPos > (this->height() - 22) && yPos < (this->height() - 18))  
  21.             *result = HTBOTTOM;  
  22.         if(xPos > 18 && xPos < 22 && yPos > 18 && yPos < 22)  
  23.             *result = HTTOPLEFT;  
  24.         if(xPos > (this->width() - 22) && xPos < (this->width() - 18) && yPos > 18 && yPos < 22)  
  25.             *result = HTTOPRIGHT;  
  26.         if(xPos > 18 && xPos < 22 && yPos > (this->height() - 22) && yPos < (this->height() - 18))  
  27.             *result = HTBOTTOMLEFT;  
  28.         if(xPos > (this->width() - 22) && xPos < (this->width() - 18) && yPos > (this->height() - 22) && yPos < (this->height() - 18))  
  29.             *result = HTBOTTOMRIGHT;  
  30.   
  31.         return true;  
  32.     }  
  33.     return false;  
  34. }  

鎶婂悇縐嶈竟鐣屾儏鍐典繚瀛樺埌result緇檞indows澶勭悊錛屾垜浠氨鐪佸幓寰堝浜嬫儏錛屾垜鎯硍indows鑲畾姣旀垜浠嚜宸卞疄鐜扮殑鏁堟灉瑕佸ソ澶氫簡銆?/p> 浠ヤ笂鐨?8 浠ュ強 22 鏄垜瀵圭▼搴忕殑杈圭紭榪涜鍒ゆ柇鐨勮寖鍥淬?/span>

鍥犱負

鎴戝仛浜嗚竟妗嗛槾褰便傞槾褰辮竟妗嗚瀹氫負20px鎵浠ュ湪

  1. xPos > 18 && xPos < 22 鍏跺疄灝辨槸鎴戜滑鍋囧畾鐨勮竟妗嗕簡銆?nbsp; 
  1.   
@import url(http://www.shnenglu.com/CuteSoft_Client/CuteEditor/Load.ashx?type=style&file=SyntaxHighlighter.css);@import url(/css/cuteeditor.css);

]]>
Qt錛歎se Third Party Librarieshttp://www.shnenglu.com/biao/archive/2013/06/28/201358.html閫涘鐨勮湕鐗?/dc:creator>閫涘鐨勮湕鐗?/author>Thu, 27 Jun 2013 23:31:00 GMThttp://www.shnenglu.com/biao/archive/2013/06/28/201358.htmlhttp://www.shnenglu.com/biao/comments/201358.htmlhttp://www.shnenglu.com/biao/archive/2013/06/28/201358.html#Feedback0http://www.shnenglu.com/biao/comments/commentRss/201358.htmlhttp://www.shnenglu.com/biao/services/trackbacks/201358.html

Using a third-party library with Qt is a simple process. Suppose you know of a cross-platform library that accepts audio samples of a cat's meows and translates them into English words. This library is named CatWhisperer, and has several files that it provides as part of its library. Your project, MyQtApp, stores these files in a folder named 3rdparty:

  • MyQtApp/
    • MyQtApp.pro
    • src/
      • main.cpp
    • 3rdparty/
      • CatWhisperer
        • include/
          • CatWhisperer.h
        • lib/
          • libCatWhisperer.so
          • CatWhisperer.lib
        • bin/
          • CatWhisperer.dll

To use the CatWhisperer library in MyQtAppqmake requires the location and names of the CatWhisperer libraries. Optionally, you can also:

  • Provide the location of the CatWhisperer source code so that you don't have to type out the full path to each file when you include them in your own code.
  • Choose the destination in which the MyQtApp executable will be created.

The information above is provided in the .pro file, so that qmake can parse it and produce makefiles. Makefiles contain all the information needed by your compiler and linker to produce output, whether it is an executable, another library file, etc. The next sections explain the syntax with which qmakeexpects you to provide this information.

Source code

To be able to write

#include <CatWhisperer.h>

instead of

#include <3rdparty/CatWhisperer/include/CatWhisperer.h>

you can provide the path to the CatWhisperer include directory, using the INCLUDEPATH variable:

INCLUDEPATH += 3rdparty/CatWhisperer/include

Library files

To let qmake know where to find the CatWhisperer library files, use the LIBS variable:

LIBS += -L"3rdparty/CatWhisperer/lib" -lCatWhisperer

The first part of the expression lets the linker know in which directory it should look for the library files. The double quotes are only necessary when the path contains spaces, so we could have omitted them in this example.

The second part tells the linker which libraries to link against. We have two different library files for UNIX platforms and Windows, respectively:libCatWhisperer.so and CatWhisperer.lib. It is not necessary to specify the .lib extension, nor the lib prefix (on UNIX platforms).

Destination directory

By default, qmake creates the executable in the same directory as the .pro file. We can choose our own directory using the DESTDIR variable:

DESTDIR = bin

That's it! You can now use the CatWhisperer library in your project. The final .pro file looks like this:

TARGET = MyQtApp
TEMPLATE = app
INCLUDEPATH += 3rdparty/CatWhisperer/include
SOURCES += src/main.cpp
LIBS += -L"3rdparty/CatWhisperer/lib" -lCatWhisperer

See also qmake Manual and Adding Libraries to Projects.

@import url(http://www.shnenglu.com/CuteSoft_Client/CuteEditor/Load.ashx?type=style&file=SyntaxHighlighter.css);@import url(/css/cuteeditor.css);

]]>
Qt錛氳В璇籕_GLOBAL_STATIC(QFontDatabasePrivate, privateDb) http://www.shnenglu.com/biao/archive/2013/06/26/201312.html閫涘鐨勮湕鐗?/dc:creator>閫涘鐨勮湕鐗?/author>Wed, 26 Jun 2013 02:02:00 GMThttp://www.shnenglu.com/biao/archive/2013/06/26/201312.htmlhttp://www.shnenglu.com/biao/comments/201312.htmlhttp://www.shnenglu.com/biao/archive/2013/06/26/201312.html#Feedback0http://www.shnenglu.com/biao/comments/commentRss/201312.htmlhttp://www.shnenglu.com/biao/services/trackbacks/201312.htmlFrom: http://zhgw01.blog.163.com/blog/static/1041481220105253491586/
鏍規嵁 src/corelib/global.h
 template <typename T>
class QGlobalStatic
{
public:
    T *pointer;
    inline QGlobalStatic(T *p) : pointer(p) { }
    inline ~QGlobalStatic() { pointer = 0; }
};

#define Q_GLOBAL_STATIC(TYPE, NAME)                              \
    static TYPE *NAME()                                          \
    {                                                            \
        static TYPE this_##NAME;                                 \
        static QGlobalStatic<TYPE > global_##NAME(&this_##NAME); \
        return global_##NAME.pointer;                            \
    }

   

涓婇潰鐨勫睍寮鎴?/span>
 static  QFontDatabasePrivate *privateDb()
{
    static QFontDatabasePrivate this_privateDb;  // 娉ㄦ剰絎竴嬈″紩鐢ㄧ殑鏃跺欎細寮濮嬭繘琛屽垵濮嬪寲, 浠ュ悗涓嶅啀鐢熸垚
   static QGLobalStatic<QFontDatabasePrivate> global_privateDb(&this_privateDb); //瀵逛笂闈㈢敓鎴愮殑瀵硅薄鐨勬寚閽堣繘琛屽寘瑁咃紝 鍚屼笂錛屽彧鏈夌涓嬈℃墠浼氱敓鎴?br />
  return global_privateDb;
}

QFontDatabase鐨勬瀯閫犲嚱鏁頒腑浼氳皟鐢╟reateDatabase 錛堥噷闈㈣皟鐢ㄤ簡initializeDb), initializeDb閲岃皟鐢ㄤ簡privateDb(),涓涓繖涓椂鍊欐槸絎竴嬈¤皟鐢紝 浼氱敓鎴怮FontDatabasePrivate瀵硅薄

QFontDatabasePrivate涓殑QDataStream *stream鎴愬憳鎵嶆槸鐪熸澶勭悊qte鐨勫瓧浣?/p>

]]>
C++錛歈T鎻掍歡寮鍙戞柟寮?/title><link>http://www.shnenglu.com/biao/archive/2013/06/25/201308.html</link><dc:creator>閫涘鐨勮湕鐗?/dc:creator><author>閫涘鐨勮湕鐗?/author><pubDate>Tue, 25 Jun 2013 15:26:00 GMT</pubDate><guid>http://www.shnenglu.com/biao/archive/2013/06/25/201308.html</guid><wfw:comment>http://www.shnenglu.com/biao/comments/201308.html</wfw:comment><comments>http://www.shnenglu.com/biao/archive/2013/06/25/201308.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/biao/comments/commentRss/201308.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/biao/services/trackbacks/201308.html</trackback:ping><description><![CDATA[From: http://blog.csdn.net/henreash/article/details/7264489@import url(http://www.shnenglu.com/CuteSoft_Client/CuteEditor/Load.ashx?type=style&file=SyntaxHighlighter.css);@import url(/css/cuteeditor.css); <div> <p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">鍒涘緩涓涓猀T鐨勫簱欏圭洰,鍒犻櫎鑷姩鐢熸垚鐨?h鍜?cpp鏂囦歡,娣誨姞涓涓帴鍙e畾涔?h鏂囦歡鍜屼竴涓帴鍙e疄鐜扮被(涓涓?h涓涓?cpp).浠g爜濡備笅:</p> <p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">1.鎺ュ彛鏂囦歡婧愮爜</p> <p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">#ifndef PLUGININTERFACE_H<br /> #define PLUGININTERFACE_H</p> <p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">#include <QString></p> <p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><br /> class EchoInterface<br /> {<br /> public:<br />  virtual ~EchoInterface() {}<br />  virtual QString echo(const QString &message) = 0;<br /> };</p> <p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">QT_BEGIN_NAMESPACE<br /> Q_DECLARE_INTERFACE(EchoInterface, "com.hollysys.plugin.EchoIntrface/1.0");<br /> QT_END_NAMESPACE</p> <p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><br /> #endif</p> <p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">2.鎺ュ彛瀹炵幇綾誨ご鏂囦歡</p> <p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">#ifndef PLUGIN_H<br /> #define PLUGIN_H</p> <p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">//#include "plugin_global.h"<br /> #include <QObject><br /> #include "plugininterface.h"</p> <p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">class Plugin : public QObject, EchoInterface<br /> {<br />  Q_OBJECT<br />  Q_INTERFACES(EchoInterface)<br /> public:<br />  Plugin();<br />  ~Plugin();<br /> public:<br />  QString echo(const QString &message);</p> <p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><br /> };</p> <p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">#endif // PLUGIN_H</p> <p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">3.鎺ュ彛瀹炵幇綾籧pp鏂囦歡</p> <p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">#include "plugin.h"<br /> #include <QtGui></p> <p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><br /> Plugin::Plugin()<br /> {</p> <p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">}</p> <p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">Plugin::~Plugin()<br /> {</p> <p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">}</p> <p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">QString Plugin::echo(const QString &message)<br /> {<br />  return message;<br /> }</p> <p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">Q_EXPORT_PLUGIN2("echoPlugin", Plugin);<br /> </p> <p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">緙栬瘧鐢熸垚dll鏍煎紡鐨勬彃浠?榪欓噷鍙兘浼氶亣鍒癓NK2001閿欒,鍥犱負鎻掍歡鎺ュ彛瀹氫箟渚濊禆浜嶲T鐨勫厓鏁版嵁,鑰屽湪浠g爜涓墜鍔ㄦ坊鍔燪_OBJECT瀹忓悗,緙栬瘧鍣ㄤ笉浼氳嚜鍔ㄤ負鎴戜滑鐢熸垚moc_XXXX.cpp鏂囦歡,鍥犳闇瑕佷嬌鐢ㄥ懡浠よ鐢熸垚moc鍏冩暟鎹枃浠?cmd-->cd 婧愮爜鎵鍦ㄥ懡浠?-->moc -o moc_XXXX.cpp XXXX.h.榪欐牱灝卞彲浠ユ墜鍔ㄥ垱寤哄嚭moc鍏冩暟鎹枃浠?瑙e喅LNK2001緙栬瘧閿欒.</p> <p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">寤虹珛涓涓狦UI嫻嬭瘯欏圭洰,浠g爜濡備笅:</p> <p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">#include "test.h"<br /> #include <QtGui><br /> #include <QMessageBox><br /> #include <QDir></p> <p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">Test::Test(QWidget *parent, Qt::WFlags flags)<br />  : QMainWindow(parent, flags)<br /> {<br />  ui.setupUi(this);<br />  QObject::connect(ui.pushButton, SIGNAL(clicked()), this, SLOT(ButtonClicked()));<br />  loadPlugin();<br /> }</p> <p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">Test::~Test()<br /> {</p> <p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">}</p> <p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">bool Test::loadPlugin()<br /> {<br />  QDir pluginsDir(qApp->applicationDirPath());<br />  foreach (QString filename, pluginsDir.entryList(QDir::Files))<br />  {<br />   QPluginLoader pluginLoader(pluginsDir.absoluteFilePath(filename));<br />   QObject *plugin = pluginLoader.instance();<br />   if(plugin)<br />   {<br />    echoInterface = qobject_cast<EchoInterface *>(plugin);//echoInterface鏄垚鍛樺彉閲?br />    if(echoInterface)<br />     return true;<br />   }<br />  }<br /> }</p> <p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">void Test::ButtonClicked()<br /> {<br />  QString plugin = ui.lineEdit->text();<br />  QMessageBox::information(NULL, "", echoInterface->echo(plugin));<br /> }</p> <p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">鍒嗘瀽浠g爜鍙,榪欓噷瀵規墍鏈変笌exe鏂囦歡鍚岀洰褰曠殑鏂囦歡灝濊瘯鍔犺澆鎻掍歡,濡傛灉鍔犺澆鎴愬姛鍒欒繑鍥?浠g爜瀹炵幇闈炲父綆媧?鍦ㄦ寮忓紑鍙戜腑鍙皢宸插姞杞界殑鎻掍歡鎺ュ彛瀛樻斁鍦ㄥ垪琛ㄤ腑,鍦ㄩ渶瑕佺殑鏃跺欎緷嬈¤皟鐢ㄥ嵆鍙?</p> <p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">鍙﹀濡傛灉鎯寵幏鍙栨彃浠朵腑綾誨畾涔夌殑鍏冩暟鎹?鍙互浣挎彃浠舵帴鍙g被浠嶲Object緇ф壙,騫朵嬌鐢≦_CLASSINFO瀹忔坊鍔犻敭鍊煎,濡俀_CLASSINFO("Author**", "Henreash**").騫朵粠涓葷▼搴忎腑浣跨敤鎻掍歡瀵硅薄鍏冩暟鎹幏鍙栬繖浜涢敭鍊煎:</p> <p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "> const QMetaObject *mo = echoInterface->metaObject();<br />  for(int i = 0; i < mo->classInfoCount(); i++)<br />  {<br />   qDebug() << mo->classInfo(i).name() << mo->classInfo(i).value();<br />  }</p> <p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">浣跨敤榪欎釜鏈哄埗鍙互鍦ㄥ畾涔夋彃浠剁被鐨勬椂鍊欏悜涓葷▼搴忎紶閫掍竴浜涚壒孌婁俊鎭?</p> <p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">嫻嬭瘯鍙戠幇,濡傛灉鍦ㄦ彃浠舵帴鍙g被涓畾涔変竴涓潤鎬佸彉閲?閭d箞榪欎釜闈欐佸彉閲忓湪鎻掍歡涓殑鍦板潃鍜屽湪涓葷▼搴忎腑鐨勫湴鍧鏄笉鐩稿悓鐨?</p> </div><img src ="http://www.shnenglu.com/biao/aggbug/201308.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/biao/" target="_blank">閫涘鐨勮湕鐗?/a> 2013-06-25 23:26 <a href="http://www.shnenglu.com/biao/archive/2013/06/25/201308.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>C++錛氬崟渚?Singletonhttp://www.shnenglu.com/biao/archive/2013/06/25/201306.html閫涘鐨勮湕鐗?/dc:creator>閫涘鐨勮湕鐗?/author>Tue, 25 Jun 2013 13:46:00 GMThttp://www.shnenglu.com/biao/archive/2013/06/25/201306.htmlhttp://www.shnenglu.com/biao/comments/201306.htmlhttp://www.shnenglu.com/biao/archive/2013/06/25/201306.html#Feedback0http://www.shnenglu.com/biao/comments/commentRss/201306.htmlhttp://www.shnenglu.com/biao/services/trackbacks/201306.htmlFrom: http://zh.wikipedia.org/wiki/鍗曚緥妯″紡

鍦?a title="C++" style="text-decoration: none; color: #0b0080; background-image: none; background-position: initial initial; background-repeat: initial initial; ">C++緙栫▼璇█涓紝鍗曚緥妯″紡搴旂敤鐨勪緥瀛愬涓嬭堪浠g爜鎵紺猴紙榪欓噷浠呬粎鎻愪緵涓涓ず渚嬶紝榪欎釜渚嬪瓙瀵瑰綰跨▼鐨勬儏鍐靛茍涓嶆槸瀹夊叏鐨勶級錛?/p>

// ...
class lock
{
public:
lock();
lock(lock const & l);
~lock();
lock & operator =(lock const & l);
void request();
void release();
// ...
};
lock::lock()
{
// ...
}
// ...
lock::~lock()
{
// ...
}
// ...
void lock::request()
{
// ...
}
void lock::release()
{
// ...
}
// ...
// assumes _DATA_TYPE_ has a default constructor
template<typename _DATA_TYPE_>
class singleton
{
public:
static _DATA_TYPE_ * request();
static void release();
private:
singleton();
singleton(singleton<_DATA_TYPE_> const & s);
~singleton();
singleton<_DATA_TYPE_> & operator =(singleton<_DATA_TYPE_> const & s);
static _DATA_TYPE_ * pointer;
static lock mutex;
// ...
};
template<typename _DATA_TYPE_>
_DATA_TYPE_ * singleton<_DATA_TYPE_>::pointer = 0;
template<typename _DATA_TYPE_>
lock singleton<_DATA_TYPE_>::mutex;
template<typename _DATA_TYPE_>
_DATA_TYPE_ * singleton<_DATA_TYPE_>::request()
{
if(singleton<_DATA_TYPE_>::pointer == 0)
{
singleton<_DATA_TYPE_>::mutex.request();
if(singleton<_DATA_TYPE_>::pointer == 0)
{
singleton<_DATA_TYPE_>::pointer = new _DATA_TYPE_;
}
singleton<_DATA_TYPE_>::mutex.release();
}
return singleton<_DATA_TYPE_>::pointer;
}
template<typename _DATA_TYPE_>
void singleton<_DATA_TYPE_>::release()
{
if(singleton<_DATA_TYPE_>::pointer != 0)
{
singleton<_DATA_TYPE_>::mutex.request();
if(singleton<_DATA_TYPE_>::pointer != 0)
{
delete singleton<_DATA_TYPE_>::pointer;
singleton<_DATA_TYPE_>::pointer = 0;
}
singleton<_DATA_TYPE_>::mutex.release();
}
}
template<typename _DATA_TYPE_>
singleton<_DATA_TYPE_>::singleton()
{
// ...
}
// ...
int main()
{
int * s;
s = singleton<int>::request();
// ...
singleton<int>::release();
return 0;
}

@import url(http://www.shnenglu.com/CuteSoft_Client/CuteEditor/Load.ashx?type=style&file=SyntaxHighlighter.css);@import url(/css/cuteeditor.css);

]]>
OpenGL錛氬睍紺篛penGL鐗規х殑杞歡Tutorshttp://www.shnenglu.com/biao/archive/2013/04/19/199557.html閫涘鐨勮湕鐗?/dc:creator>閫涘鐨勮湕鐗?/author>Thu, 18 Apr 2013 16:24:00 GMThttp://www.shnenglu.com/biao/archive/2013/04/19/199557.htmlhttp://www.shnenglu.com/biao/comments/199557.htmlhttp://www.shnenglu.com/biao/archive/2013/04/19/199557.html#Feedback0http://www.shnenglu.com/biao/comments/commentRss/199557.htmlhttp://www.shnenglu.com/biao/services/trackbacks/199557.html nate robins
main OPENGL chronicles allies
--- Tutors ---

Tutors source code package (tutors-src.zip 920KB) 

Source package + Windows executables (tutors-win32.zip 1.24MB) 

Source package + Mac OS X universal binaries (tutors-macosx.zip 1.2MB) 

Contributions from various people (Unix makefiles, etc). 

fog
(click on image to enlarge it)
The fog tutorial program (shown at right) demonstrates how to use depth cueing (or fog) in OpenGL. It includes command panels that allow dynamic update of the parameters for linear, exponential and exponential2 fog functions. The fog color can also be dynamically changed.
lightposition
(click on image to enlarge it)
The lightposition tutorial program (shown at left) demonstrates how lighting position is effected by the viewing transformation. The order in which the light position and the viewing transform are established is configurable, as are the parameters for the position and transform.
lightmaterial
(click on image to enlarge it)

The lightmaterial tutorial program (shown above) demonstrates how OpenGL lighting and material properties interact and effect each other. All material & light properties are tweakable. A second command panel allows spotlight parameters & attenuation factors to be changed.
projection
(click on image to enlarge it)
The projection tutorial program (shown at right) demonstrates how the many types of projection transformations work. A command panel is included for gluPerspective(), glOrtho() and glFrustum(). In addition, the viewing transform can be modified via the gluLookat() function.
transformation
(click on image to enlarge it)
The transformation tutorial program (shown at left) demonstrates how the basic transformations of rotate, translate and scale operate in OpenGL. The order of the transforms can be changed to see how that effects rendering.
texture
(click on image to enlarge it)

The texture tutorial program (shown above) demonstrates how OpenGL texturing works. Specifically, the texture coordinates for a polygon are provided for manipulation as are the polygons coordinates themselves. The texture parameter & environment attributes are tweakable. A separate command panel allows manipulation of the texture matrix.
shapes
(click on image to enlarge it)
The shapes tutorial program (shown at right) demonstrates how the many types of primitives work. A command panel for each primitive type is included. This tutorial was written by Mason Woo (mason@woo.com).



--- --- ---

@import url(http://www.shnenglu.com/CuteSoft_Client/CuteEditor/Load.ashx?type=style&file=SyntaxHighlighter.css);@import url(/css/cuteeditor.css);

]]>
C++錛歀IB鍜孌LL鐨勫尯鍒笌浣跨敤http://www.shnenglu.com/biao/archive/2013/03/14/198416.html閫涘鐨勮湕鐗?/dc:creator>閫涘鐨勮湕鐗?/author>Thu, 14 Mar 2013 06:38:00 GMThttp://www.shnenglu.com/biao/archive/2013/03/14/198416.htmlhttp://www.shnenglu.com/biao/comments/198416.htmlhttp://www.shnenglu.com/biao/archive/2013/03/14/198416.html#Feedback0http://www.shnenglu.com/biao/comments/commentRss/198416.htmlhttp://www.shnenglu.com/biao/services/trackbacks/198416.html鍏辨湁涓ょ搴擄細
涓縐嶆槸LIB鍖呭惈浜嗗嚱鏁版墍鍦ㄧ殑DLL鏂囦歡鍜屾枃浠朵腑鍑芥暟浣嶇疆鐨勪俊鎭紙鍏ュ彛錛夛紝浠g爜鐢辮繍琛屾椂鍔犺澆鍦ㄨ繘紼嬬┖闂翠腑鐨凞LL鎻愪緵錛岀О涓哄姩鎬侀摼鎺ュ簱dynamic link library銆?/span>
涓縐嶆槸LIB鍖呭惈鍑芥暟浠g爜鏈韓錛屽湪緙栬瘧鏃剁洿鎺ュ皢浠g爜鍔犲叆紼嬪簭褰撲腑錛岀О涓洪潤鎬侀摼鎺ュ簱static link library銆?/span>
鍏辨湁涓ょ閾炬帴鏂瑰紡錛?/span>
鍔ㄦ侀摼鎺ヤ嬌鐢ㄥ姩鎬侀摼鎺ュ簱錛屽厑璁稿彲鎵ц妯″潡錛?dll鏂囦歡鎴?exe鏂囦歡錛変粎鍖呭惈鍦ㄨ繍琛屾椂瀹氫綅DLL鍑芥暟鐨勫彲鎵ц浠g爜鎵闇鐨勪俊鎭?/span>
闈欐侀摼鎺ヤ嬌鐢ㄩ潤鎬侀摼鎺ュ簱錛岄摼鎺ュ櫒浠庨潤鎬侀摼鎺ュ簱LIB鑾峰彇鎵鏈夎寮曠敤鍑芥暟錛屽茍灝嗗簱鍚屼唬鐮佷竴璧鋒斁鍒板彲鎵ц鏂囦歡涓?/span>

鍏充簬lib鍜宒ll鐨勫尯鍒涓嬶細
錛?錛塴ib鏄紪璇戞椂鐢ㄥ埌鐨勶紝dll鏄繍琛屾椂鐢ㄥ埌鐨勩傚鏋滆瀹屾垚婧愪唬鐮佺殑緙栬瘧錛屽彧闇瑕乴ib錛涘鏋滆浣垮姩鎬侀摼鎺ョ殑紼嬪簭榪愯璧鋒潵錛屽彧闇瑕乨ll銆?/span>
錛?錛夊鏋滄湁dll鏂囦歡錛岄偅涔坙ib涓鑸槸涓浜涚儲寮曚俊鎭紝璁板綍浜哾ll涓嚱鏁扮殑鍏ュ彛鍜屼綅緗紝dll涓槸鍑芥暟鐨勫叿浣撳唴瀹癸紱濡傛灉鍙湁lib鏂囦歡錛岄偅涔堣繖涓猯ib鏂囦歡鏄潤鎬佺紪璇戝嚭鏉ョ殑錛岀儲寮曞拰瀹炵幇閮藉湪鍏朵腑銆備嬌鐢ㄩ潤鎬佺紪璇戠殑lib鏂囦歡錛屽湪榪愯紼嬪簭鏃朵笉闇瑕佸啀鎸傚姩鎬佸簱錛岀己鐐規槸瀵艱嚧搴旂敤紼嬪簭姣旇緝澶э紝鑰屼笖澶卞幓浜嗗姩鎬佸簱鐨勭伒媧繪э紝鍙戝竷鏂扮増鏈椂瑕佸彂甯冩柊鐨勫簲鐢ㄧ▼搴忔墠琛屻?/span>
錛?錛夊姩鎬侀摼鎺ョ殑鎯呭喌涓嬶紝鏈変袱涓枃浠訛細涓涓槸LIB鏂囦歡錛屼竴涓槸DLL鏂囦歡銆侺IB鍖呭惈琚獶LL瀵煎嚭鐨勫嚱鏁板悕縐板拰浣嶇疆錛孌LL鍖呭惈瀹為檯鐨勫嚱鏁板拰鏁版嵁錛屽簲鐢ㄧ▼搴忎嬌鐢↙IB鏂囦歡閾炬帴鍒癉LL鏂囦歡銆傚湪搴旂敤紼嬪簭鐨勫彲鎵ц鏂囦歡涓紝瀛樻斁鐨勪笉鏄璋冪敤鐨勫嚱鏁頒唬鐮侊紝鑰屾槸DLL涓浉搴斿嚱鏁頒唬鐮佺殑鍦板潃錛屼粠鑰岃妭鐪佷簡鍐呭瓨璧勬簮銆侱LL鍜孡IB鏂囦歡蹇呴』闅忓簲鐢ㄧ▼搴忎竴璧峰彂琛岋紝鍚﹀垯搴旂敤紼嬪簭浼氫駭鐢熼敊璇傚鏋滀笉鎯崇敤lib鏂囦歡鎴栬呮病鏈塴ib鏂囦歡錛屽彲浠ョ敤WIN32 API鍑芥暟LoadLibrary銆丟etProcAddress瑁呰澆銆?/span>

浣跨敤lib闇娉ㄦ剰涓や釜鏂囦歡錛?/span>
錛?錛?h澶存枃浠訛紝鍖呭惈lib涓鏄庤緭鍑虹殑綾繪垨絎﹀彿鍘熷瀷鎴栨暟鎹粨鏋勩傚簲鐢ㄧ▼搴忚皟鐢╨ib鏃訛紝闇瑕佸皢璇ユ枃浠跺寘鍚叆搴旂敤紼嬪簭鐨勬簮鏂囦歡涓?/span>
錛?錛?LIB鏂囦歡錛岀暐銆?/span>

浣跨敤dll闇娉ㄦ剰涓変釜鏂囦歡錛?/span>
錛?錛?h澶存枃浠訛紝鍖呭惈dll涓鏄庤緭鍑虹殑綾繪垨絎﹀彿鍘熷瀷鎴栨暟鎹粨鏋勭殑.h鏂囦歡銆傚簲鐢ㄧ▼搴忚皟鐢╠ll鏃訛紝闇瑕佸皢璇ユ枃浠跺寘鍚叆搴旂敤紼嬪簭鐨勬簮鏂囦歡涓?/span>
錛?錛?LIB鏂囦歡錛屾槸dll鍦ㄧ紪璇戙侀摼鎺ユ垚鍔熶箣鍚庣敓鎴愮殑鏂囦歡錛屼綔鐢ㄦ槸褰撳叾浠栧簲鐢ㄧ▼搴忚皟鐢╠ll鏃訛紝闇瑕佸皢璇ユ枃浠跺紩鍏ュ簲鐢ㄧ▼搴忥紝鍚﹀垯浜х敓閿欒銆?/span>濡傛灉涓嶆兂鐢╨ib鏂囦歡鎴栬呮病鏈塴ib鏂囦歡錛屽彲浠ョ敤WIN32 API鍑芥暟LoadLibrary銆丟etProcAddress瑁呰澆銆?br />錛?錛?dll鏂囦歡錛岀湡姝g殑鍙墽琛屾枃浠訛紝寮鍙戞垚鍔熷悗鐨勫簲鐢ㄧ▼搴忓湪鍙戝竷鏃訛紝鍙渶瑕佹湁.exe鏂囦歡鍜?dll鏂囦歡錛屽茍涓嶉渶瑕?lib鏂囦歡鍜?h澶存枃浠躲?/span>

浣跨敤lib鐨勬柟娉曪細
闈欐乴ib涓紝涓涓猯ib鏂囦歡瀹為檯涓婃槸浠繪剰涓猳bj鏂囦歡鐨勯泦鍚堬紝obj鏂囦歡鏄痗pp鏂囦歡緙栬瘧鐢熸垚鐨勩傚湪緙栬瘧榪欑闈欐佸簱宸ョ▼鏃訛紝鏍規湰涓嶄細閬囧埌閾炬帴閿欒錛涘嵆浣挎湁閿欙紝涔熷彧浼氬湪浣跨敤榪欎釜lib鐨凟XT鏂囦歡鎴栬匘LL宸ョ▼閲屾毚闇插嚭鏉ャ?/span>
鍦╒C涓柊寤轟竴涓猻tatic library綾誨瀷鐨勫伐紼婰ib錛屽姞鍏est.cpp鏂囦歡鍜宼est.h鏂囦歡錛堝ご鏂囦歡鍐呭寘鎷嚱鏁板0鏄庯級錛岀劧鍚庣紪璇戯紝灝辯敓鎴愪簡Lib.lib鏂囦歡銆?/span>
鍒殑宸ョ▼瑕佷嬌鐢ㄨ繖涓猯ib鏈変袱縐嶆柟寮忥細
錛?錛夊湪project->link->Object/Library Module涓姞鍏ib.lib鏂囦歡錛堝厛鏌ヨ宸ョ▼鐩綍錛屽啀鏌ヨ緋葷粺Lib鐩綍錛夛紱鎴栬呭湪婧愪唬鐮佷腑鍔犲叆鎸囦護#pragma comment(lib, “Lib.lib”)銆?/span>
錛?錛夊皢Lib.lib鎷峰叆宸ョ▼鎵鍦ㄧ洰褰曪紝鎴栬呮墽琛屾枃浠剁敓鎴愮殑鐩綍錛屾垨鑰呯郴緇烲ib鐩綍涓?/span>
錛?錛夊姞鍏ョ浉搴旂殑澶存枃浠秚est.h銆?/span>

浣跨敤DLL鐨勬柟娉曪細
浣跨敤鍔ㄦ侀摼鎺ヤ腑鐨刲ib錛屼笉鏄痮bj鏂囦歡鐨勯泦鍚堬紝鍗抽噷闈笉浼氭湁瀹為檯鐨勫疄鐜幫紝瀹冨彧鏄彁渚涘姩鎬侀摼鎺ュ埌DLL鎵闇瑕佺殑淇℃伅錛岃繖縐峫ib鍙互鍦ㄧ紪璇戜竴涓狣LL宸ョ▼鏃剁敱緙栬瘧鍣ㄧ敓鎴愩?/span>
鍒涘緩DLL宸ョ▼鐨勬柟娉曪紙鐣ワ級銆?/span>
錛?錛夐殣寮忛摼鎺?/strong>
絎竴縐嶆柟娉曟槸錛氶氳繃project->link->Object/Library Module涓姞鍏?lib鏂囦歡錛堟垨鑰呭湪婧愪唬鐮佷腑鍔犲叆鎸囦護#pragma comment(lib, “Lib.lib”)錛夛紝騫跺皢.dll鏂囦歡緗叆宸ョ▼鎵鍦ㄧ洰褰曪紝鐒跺悗娣誨姞瀵瑰簲鐨?h澶存枃浠躲?/span>

#include "stdafx.h"
#include "DLLSample.h"

#pragma comment(lib, "DLLSample.lib")    //浣犱篃鍙互鍦ㄩ」鐩睘鎬т腑璁劇疆搴撶殑閾炬帴

int main()
{
        TestDLL(123);   //dll涓殑鍑芥暟錛屽湪DllSample.h涓0鏄?/span>
        return(1);
}

錛?錛夋樉寮忛摼鎺?/strong>
闇瑕佸嚱鏁版寚閽堝拰WIN32 API鍑芥暟LoadLibrary銆丟etProcAddress瑁呰澆錛屼嬌鐢ㄨ繖縐嶈澆鍏ユ柟娉曪紝涓嶉渶瑕?lib鏂囦歡鍜?h澶存枃浠訛紝鍙渶瑕?dll鏂囦歡鍗沖彲錛堝皢.dll鏂囦歡緗叆宸ョ▼鐩綍涓級銆?/span>

#include <iostream>
#include <windows.h>         //浣跨敤鍑芥暟鍜屾煇浜涚壒孌婂彉閲?/span>
typedef void (*DLLFunc)(int);
int main()
{
        DLLFunc dllFunc;
        HINSTANCE hInstLibrary = LoadLibrary("DLLSample.dll");

        
if (hInstLibrary == NULL)
        
{
          FreeLibrary(hInstLibrary);
        }

        dllFunc = (DLLFunc)GetProcAddress(hInstLibrary, "TestDLL");
        
if (dllFunc == NULL)
        
{
          FreeLibrary(hInstLibrary);
        }

        dllFunc(123);
        std::cin.get();
        FreeLibrary(hInstLibrary);
        
return(1);
}


LoadLibrary鍑芥暟鍒╃敤涓涓悕縐頒綔涓哄弬鏁幫紝鑾峰緱DLL鐨勫疄渚嬶紙HINSTANCE綾誨瀷鏄疄渚嬬殑鍙ユ焺錛夛紝閫氬父璋冪敤璇ュ嚱鏁板悗闇瑕佹煡鐪嬩竴涓嬪嚱鏁拌繑鍥炴槸鍚︽垚鍔燂紝濡傛灉涓嶆垚鍔熷垯榪斿洖NULL錛堝彞鏌勬棤鏁堬級錛屾鏃惰皟鐢ㄥ嚱鏁癋reeLibrary閲婃斁DLL鑾峰緱鐨勫唴瀛樸?/span>
GetProcAddress鍑芥暟鍒╃敤DLL鐨勫彞鏌勫拰鍑芥暟鐨勫悕縐頒綔涓哄弬鏁幫紝榪斿洖鐩稿簲鐨勫嚱鏁版寚閽堬紝鍚屾椂蹇呴』浣跨敤寮鴻漿錛涘垽鏂嚱鏁版寚閽堟槸鍚︿負NULL錛屽鏋滄槸鍒欒皟鐢ㄥ嚱鏁癋reeLibrary閲婃斁DLL鑾峰緱鐨勫唴瀛樸傛鍚庯紝鍙互浣跨敤鍑芥暟鎸囬拡鏉ヨ皟鐢ㄥ疄闄呯殑鍑芥暟銆?/span>
鏈鍚庤璁板緱浣跨敤FreeLibrary鍑芥暟閲婃斁鍐呭瓨銆?/span>

娉ㄦ剰錛氬簲鐢ㄧ▼搴忓浣曟壘鍒癉LL鏂囦歡錛?/span>
浣跨敤LoadLibrary鏄懼紡閾炬帴錛岄偅涔堝湪鍑芥暟鐨勫弬鏁頒腑鍙互鎸囧畾DLL鏂囦歡鐨勫畬鏁磋礬寰勶紱濡傛灉涓嶆寚瀹氳礬寰勶紝鎴栬呰繘琛岄殣寮忛摼鎺ワ紝Windows灝嗛伒寰笅闈㈢殑鎼滅儲欏哄簭鏉ュ畾浣岲LL錛?/span>
錛?錛夊寘鍚獷XE鏂囦歡鐨勭洰褰?/span>
錛?錛夊伐紼嬬洰褰?/span>
錛?錛塛indows緋葷粺鐩綍
錛?錛塛indows鐩綍
錛?錛夊垪鍦≒ath鐜鍙橀噺涓殑涓緋誨垪鐩綍

From: http://www.shnenglu.com/ming81/archive/2013/03/04/198215.html

.h澶存枃浠舵槸緙栬瘧鏃跺繀欏葷殑錛宭ib鏄摼鎺ユ椂闇瑕佺殑錛宒ll鏄繍琛屾椂闇瑕佺殑銆?/span>

闄勫姞渚濊禆欏圭殑鏄?lib涓嶆槸.dll錛岃嫢鐢熸垚浜咲LL,鍒欒偗瀹氫篃鐢熸垚 LIB鏂囦歡銆傚鏋滆瀹屾垚婧愪唬鐮佺殑緙栬瘧鍜岄摼鎺ワ紝鏈夊ご鏂囦歡鍜宭ib灝卞浜嗐傚鏋滀篃浣垮姩鎬佽繛鎺ョ殑紼嬪簭榪愯璧鋒潵錛屾湁dll灝卞浜嗐傚湪寮鍙戝拰璋冭瘯闃舵錛屽綋鐒舵渶濂介兘鏈夈?/span>

.h .lib .dll涓夎呯殑鍏崇郴鏄細

H鏂囦歡浣滅敤鏄?澹版槑鍑芥暟鎺ュ彛 

DLL鏂囦歡浣滅敤鏄? 鍑芥暟鍙墽琛屼唬鐮?nbsp;

褰撴垜浠湪鑷繁鐨勭▼搴忎腑寮曠敤浜嗕竴涓狧鏂囦歡閲岀殑鍑芥暟,緙栭摼鍣ㄦ庝箞鐭ラ亾璇ヨ皟鐢ㄥ摢涓狣LL鏂囦歡鍛?榪欏氨鏄疞IB鏂囦歡鐨勪綔鐢? 鍛婅瘔閾炬帴鍣?璋冪敤鐨勫嚱鏁板湪鍝釜DLL涓紝鍑芥暟鎵ц浠g爜鍦―LL涓殑浠涔堜綅緗?錛岃繖涔熷氨鏄負浠涔堥渶瑕侀檮鍔犱緷璧栭」 .LIB鏂囦歡錛屽畠璧峰埌妗ユ鐨勪綔鐢ㄣ傚鏋滅敓鎴愰潤鎬佸簱鏂囦歡錛屽垯娌℃湁DLL 錛屽彧鏈塴ib錛岃繖鏃跺嚱鏁板彲鎵ц浠g爜閮ㄥ垎涔熷湪lib鏂囦歡涓?/span>

鐩墠浠ib鍚庣紑鐨勫簱鏈変袱縐嶏紝涓縐嶄負闈欐侀摼鎺ュ簱(Static Libary錛屼互涓嬬畝縐?#8220;闈欐佸簱”)錛屽彟涓縐嶄負鍔ㄦ佽繛鎺ュ簱(DLL錛屼互涓嬬畝縐?#8220;鍔ㄦ佸簱”)鐨勫鍏ュ簱(Import Libary錛屼互涓嬬畝縐?#8220;瀵煎叆搴?#8221;錛夈傞潤鎬佸簱鏄竴涓垨鑰呭涓猳bj鏂囦歡鐨勬墦鍖?錛屾墍浠ユ湁浜哄共鑴嗘妸浠巓bj鏂囦歡鐢熸垚lib鐨勮繃紼嬬О涓篈rchive錛屽嵆鍚堝茍鍒頒竴璧楓傛瘮濡備綘閾炬帴涓涓潤鎬佸簱錛屽鏋滃叾涓湁閿欙紝瀹冧細鍑嗙‘鐨勬壘鍒版槸鍝釜obj鏈夐敊錛屽嵆闈欐乴ib鍙槸澹沖瓙銆傚姩鎬佸簱涓鑸細鏈夊搴旂殑瀵煎叆搴擄紝鏂逛究紼嬪簭闈欐佽澆鍏ュ姩鎬侀摼鎺ュ簱 錛屽惁鍒欎綘鍙兘灝遍渶瑕佽嚜宸盠oadLibary璋冨叆DLL鏂囦歡錛岀劧鍚庡啀鎵嬪伐GetProcAddress鑾峰緱瀵瑰簲鍑芥暟浜嗐傛湁浜嗗鍏ュ簱錛屼綘鍙渶瑕侀摼鎺ュ鍏ュ簱鍚庢寜鐓уご鏂囦歡鍑芥暟鎺ュ彛鐨勫0鏄庤皟鐢ㄥ嚱鏁板氨鍙互浜嗐傚鍏ュ簱鍜岄潤鎬佸簱鐨勫尯鍒緢澶э紝浠栦滑瀹炶川鏄笉涓鏍風殑涓滆タ銆傞潤鎬佸簱鏈韓灝卞寘鍚簡瀹為檯鎵ц浠g爜銆佺鍙瘋〃絳夌瓑錛岃屽浜庡鍏ュ簱鑰岃█錛屽叾瀹為檯鐨勬墽琛屼唬鐮佷綅浜庡姩鎬佸簱涓紝瀵煎叆搴撳彧鍖呭惈浜嗗湴鍧絎﹀彿琛ㄧ瓑錛岀‘淇濈▼搴忔壘鍒板搴斿嚱鏁扮殑涓浜涘熀鏈湴鍧淇℃伅銆?/span>

涓鑸殑鍔ㄦ佸簱紼嬪簭鏈塴ib鏂囦歡鍜宒ll鏂囦歡銆俵ib鏂囦歡鏄繀欏誨湪緙栬瘧鏈熷氨榪炴帴鍒板簲鐢ㄧ▼搴忎腑鐨勶紝鑰宒ll鏂囦歡鏄繍琛屾湡鎵嶄細琚皟鐢ㄧ殑銆?濡傛灉鏈塪ll鏂囦歡錛岄偅涔堝搴旂殑lib鏂囦歡涓鑸槸涓浜涚儲寮曚俊鎭紝鍏蜂綋鐨勫疄鐜板湪dll鏂囦歡涓傚鏋滃彧鏈塴ib鏂囦歡錛岄偅涔堣繖涓猯ib鏂囦歡鏄潤鎬佺紪璇戝嚭鏉ョ殑錛岀儲寮曞拰瀹炵幇閮藉湪鍏朵腑銆傞潤鎬佺紪璇戠殑lib鏂囦歡鏈夊ソ澶勶細緇欑敤鎴峰畨瑁呮椂灝變笉闇瑕佸啀鎸傚姩鎬佸簱浜嗐備絾涔熸湁緙虹偣錛屽氨鏄鑷村簲鐢ㄧ▼搴忔瘮杈冨ぇ錛岃屼笖澶卞幓浜嗗姩鎬佸簱鐨勭伒媧繪э紝鍦ㄧ増鏈崌綰ф椂錛屽悓鏃惰鍙戝竷鏂扮殑搴旂敤紼嬪簭鎵嶈銆傚湪鍔ㄦ佸簱鐨勬儏鍐典笅錛屾湁涓や釜鏂囦歡錛岃屼竴涓槸寮曞叆搴擄紙.LIB錛夋枃浠訛紝涓涓槸DLL鏂囦歡錛屽紩鍏ュ簱鏂囦歡鍖呭惈琚獶LL瀵煎嚭鐨勫嚱鏁扮殑鍚嶇О鍜屼綅緗紝DLL鍖呭惈瀹為檯鐨勫嚱鏁板拰鏁版嵁錛屽簲鐢ㄧ▼搴忎嬌鐢↙IB鏂囦歡閾炬帴鍒版墍闇瑕佷嬌鐢ㄧ殑DLL鏂囦歡錛屽簱涓殑鍑芥暟鍜屾暟鎹茍涓嶅鍒跺埌鍙墽琛屾枃浠朵腑錛屽洜姝ゅ湪搴旂敤紼嬪簭鐨勫彲鎵ц鏂囦歡涓紝瀛樻斁鐨勪笉鏄璋冪敤鐨勫嚱鏁頒唬鐮侊紝鑰屾槸DLL涓墍瑕佽皟鐢ㄧ殑鍑芥暟鐨勫唴瀛樺湴鍧錛岃繖鏍峰綋涓涓垨澶氫釜搴旂敤紼嬪簭榪愯鏄啀鎶婄▼搴忎唬鐮佸拰琚皟鐢ㄧ殑鍑芥暟浠g爜閾炬帴璧鋒潵錛屼粠鑰岃妭鐪佷簡鍐呭瓨璧勬簮銆備粠涓婇潰鐨勮鏄庡彲浠ョ湅鍑猴紝DLL鍜?LIB鏂囦歡蹇呴』闅忓簲鐢ㄧ▼搴忎竴璧峰彂琛岋紝鍚﹀垯搴旂敤紼嬪簭灝嗕細浜х敓閿欒銆?/span>

闈欐佸簱鍜屽叡浜簱閮芥槸涓涓猳bj鏂囦歡鐨勯泦鍚?錛屼絾闈欐侀摼鎺ュ悗錛屾墽琛岀▼搴忎腑瀛樺湪鑷繁鎵闇obj鐨勪竴浠芥嫹璐濓紝鑰屽姩鎬侀摼鎺ュ悗錛屾墽琛岀▼搴忎粎浠呮槸鍖呭惈瀵瑰叡浜簱鐨勪竴涓紩鐢ㄣ傚叡浜簱鐩稿綋浜庝竴涓敱澶氫釜obj鏂囦歡緇勫悎鑰屾垚鐨刼bj鏂囦歡錛屽湪閾炬帴鍚庡叾鎵鏈変唬鐮佽鍔犺澆錛屼笉綆¢渶瑕佺殑榪樻槸涓嶉渶瑕佺殑銆?/span>
浼間箮鍙互寰楀嚭涓涓粨璁猴細
  闈欐侀摼鎺ュ悗鐨勭▼搴忔瘮鍔ㄦ侀摼鎺ョ殑鎵鐢ㄥ瓨鍌ㄧ┖闂村ぇ錛屽洜涓烘墽琛岀▼搴忎腑鍖呭惈浜嗗簱涓唬鐮佹嫹璐濓紱
  鑰屽姩鎬侀摼鎺ョ殑紼嬪簭姣旈潤鎬侀摼鎺ョ殑鎵鐢ㄧ殑榪愯絀洪棿澶э紝鍥犱負瀹冨皢涓嶉渶瑕佺殑浠g爜涔熷姞杞藉埌榪愯絀洪棿銆?/span>


閽堝涓婇潰鐨勭煡璇? 涓棶棰橈細

1錛?DLL鍜?LIB鏂囦歡蹇呴』闅忓簲鐢ㄧ▼搴忎竴璧峰彂琛岋紝鍚﹀垯搴旂敤紼嬪簭灝嗕細浜х敓閿欒銆?nbsp;
鎴戠殑絳旀錛歭ib搴旇涓嶉渶瑕佸惂銆?br />
2錛夊鏋滄槸鏌愪釜紼嬪簭涓皟鐢ㄤ簡涓涓姩鎬佸簱錛堥氳繃header鏂囦歡錛宭ib+dll鏉ヨ皟鐢級錛屽垯瀵瑰姩鎬佸簱鐨勬煇涓嚱鏁扮殑鍐呭淇敼浜嗭紝浣嗘帴鍙d笉鏀癸紝鍒欒皟鐢ㄦ鍔ㄦ佸簱鐨勭▼搴忛渶閲嶆柊緙栬瘧榪炴帴鍚楋紵濡傛灉鏄氳繃loadlibary鍔ㄦ佸姞杞斤紝闇瑕侀噸鏂扮紪璇戣繛鎺ュ悧錛?br />

鎴戠殑絳旀錛氶氳繃header+lib+dll璋冪敤鐨勮瘽闇瑕侀噸鏂扮紪璇戣繛鎺ワ紝浣嗘槸閫氳繃loadlibrary鏉ヤ嬌鐢ㄧ殑璇濓紝涓嶉渶瑕侀噸鏂扮紪璇戣繛鎺ャ?/span>
絎?涓瓟妗堥敊浜?搴旇鏄笉闇瑕侀噸鏂扮紪璇?鎺ュ彛涓嶅彉鐨勮瘽 .lib閮戒笉鐢ㄦ洿鏂?br />From: http://www.shnenglu.com/mzty/archive/2010/11/28/134901.html

    1錛?鑺傜渷鍐呭瓨銆傚悓涓涓蔣浠舵ā鍧楋紝鑻ユ槸浠ユ簮浠g爜鐨勫艦寮忛噸鐢紝鍒欎細琚紪璇戝埌涓嶅悓鐨勫彲鎵ц紼嬪簭涓紝鍚屾椂榪愯榪欎簺exe鏃惰繖浜涙ā鍧楃殑浜岃繘鍒剁爜浼氳閲嶅鍔犺澆鍒板唴瀛樹腑銆傚 鏋滀嬌鐢╠ll,鍒欏彧鍦ㄥ唴瀛樹腑鍔犺澆涓嬈★紝鎵鏈変嬌鐢ㄨdll鐨勮繘紼嬩細鍏變韓姝ゅ潡鍐呭瓨錛堝綋鐒訛紝鍍廳ll涓殑鍏ㄥ眬鍙橀噺榪欑涓滆タ鏄細琚瘡涓繘紼嬪鍒朵竴浠界殑錛夈?/span>
    
    2錛?涓嶉渶緙栬瘧鐨勮蔣浠剁郴緇熷崌綰э紝鑻ヤ竴涓蔣浠剁郴緇熶嬌鐢ㄤ簡dll,鍒欒dll琚敼鍙橈紙鍑芥暟鍚嶄笉鍙橈級鏃訛紝緋葷粺鍗囩駭鍙渶瑕佹洿鎹㈡dll鍗沖彲錛屼笉闇瑕侀噸鏂扮紪璇戞暣涓郴緇熴備簨瀹炰笂錛屽緢澶氳蔣浠墮兘鏄互榪欑鏂瑰紡鍗囩駭鐨勩備緥濡傛垜浠粡甯哥帺鐨勬槦闄呫侀瓟鍏界瓑娓告垙涔熸槸榪欐牱榪涜鐗堟湰鍗囩駭鐨勩?/span>
    
    3錛?Dll搴撳彲浠ヤ緵澶氱緙栫▼璇█浣跨敤錛屼緥濡傜敤c緙栧啓鐨刣ll鍙互鍦╲b涓皟鐢ㄣ傝繖涓鐐逛笂DLL榪樺仛寰楀緢涓嶅錛屽洜姝ゅ湪dll鐨勫熀紜涓婂彂鏄庝簡COM鎶鏈紝鏇村ソ鐨勮В鍐充簡涓緋誨垪闂銆?/span>

 

 



]]>
鍏朵粬緙栫▼錛氱増鏈帶鍒跺叆闂ㄧ畝浠?/title><link>http://www.shnenglu.com/biao/archive/2012/04/27/172924.html</link><dc:creator>閫涘鐨勮湕鐗?/dc:creator><author>閫涘鐨勮湕鐗?/author><pubDate>Fri, 27 Apr 2012 07:07:00 GMT</pubDate><guid>http://www.shnenglu.com/biao/archive/2012/04/27/172924.html</guid><wfw:comment>http://www.shnenglu.com/biao/comments/172924.html</wfw:comment><comments>http://www.shnenglu.com/biao/archive/2012/04/27/172924.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/biao/comments/commentRss/172924.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/biao/services/trackbacks/172924.html</trackback:ping><description><![CDATA[<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Verdana; text-align: left; background-color: #e5ecf4; ">鐗堟湰鎺у埗宸茬粡鍑虹幇鏈変簺騫村ご浜嗐傜劧鑰岋紝鎴戣繕鏄細琚漢闂搗涓浜涳紝璇稿鐗堟湰鎺у埗鏄粈涔堟垨鑰呭畠鏄浣曞伐浣滅殑錛岃繖鏍峰熀紜鐨勯棶棰樸傛湰鏂囦細姒傛嫭鍦拌В閲婄増鏈帶鍒惰В鍐崇殑閲嶈闂錛屾湰鏂囦嬌鐢ㄧ殑鍦烘櫙閽堝鐨勬槸婧愪唬鐮佺増鏈帶鍒躲?/p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Verdana; text-align: left; background-color: #e5ecf4; "><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " />鐩墠鏈夊緢澶氫笉鍚岀被鍨嬬殑鐗堟湰鎺у埗緋葷粺錛圴ersion Control System錛?VCS錛夈備竴浜沄CS錛屾瘮濡?a style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #003366; text-decoration: none; ">Subversion</a>鍜?a style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #003366; text-decoration: none; ">CVS</a>錛屼互涓ぎ浠撳簱錛坮epository錛変負涓績榪涜鏋舵瀯銆傛澶栵紝榪樻湁鍒嗗竷寮忕殑VCS錛圖istributed VCS錛孌VCS錛夛紝 <a style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #003366; text-decoration: none; ">Git</a> 鍜?nbsp;<a style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #003366; text-decoration: none; ">Mercurial</a> 鏄袱涓柊榪戝嚭鐜扮殑DVCS銆傜劧鑰岋紝鍦ㄤ笂榪頒袱縐嶇被鍨嬬殑鐜涓紝閫氬父浼氭湁涓涓?#8220;鎸囧畾鐨?#8221;涓ぎ浠撳簱銆傚搴斿湴錛屾瘮濡備竴涓猄ubversion鏈嶅姟鍣ㄦ垨鑰呬竴涓?a style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #003366; text-decoration: none; ">GitHub</a>浠撳簱銆備笅闈細鍩轟簬榪欎釜鍦烘櫙榪涜鍥劇ず璇存槑銆傞偅涔堣鎴戜滑寮濮嬪惂銆?br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " /><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " />鍦ㄥ紑鍙戣呮嫹璐濆埌鏈満涔嬪墠錛屾湇鍔″櫒闇瑕佸垱寤轟竴涓粨搴撱傚垱寤哄垵濮嬩粨搴撲細鐢變簬浜у搧涓嶅悓鑰屾湁鎵宸埆銆備粠鐜板湪璧鳳紝浣犳墍瑕佺煡閬撶殑灝辨槸錛屽湪鏈嶅姟鍣ㄤ笂鏈変竴涓垵濮嬬┖闂淬傛垜鎶婅繖涓増鏈О浣滅増鏈?#8220;A”銆?br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " /><a style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #003366; text-decoration: none; "><img title="VCS1" src="http://img.cnbeta.com/newsimg/120427/08104301990317868.png" altwidth="237" style="margin-top: 5px !important; margin-right: auto; margin-bottom: 0px; margin-left: auto; padding-top: 5px; padding-right: 5px; padding-bottom: 5px; padding-left: 5px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-style: initial; border-color: initial; border-image: initial; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-width: initial; clear: both; display: block; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; border-top-left-radius: 6px; border-top-right-radius: 6px; border-bottom-right-radius: 6px; border-bottom-left-radius: 6px; border-top-color: #d4d4d4; border-right-color: #d4d4d4; border-bottom-color: #d4d4d4; border-left-color: #d4d4d4; " alt="" /></a><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " />鐜板湪錛屾瘡涓紑鍙戣咃紙寮鍙戣?鍜屽紑鍙戣?錛夐兘浼氭嫹璐濈増鏈?#8220;A”鍒頒粬浠湰鍦扮數鑴戙傚啀涓嬈″湴錛屼粠鏈嶅姟鍣ㄦ嫹璐濈殑榪囩▼浼氱敱浜庝駭鍝佷笉鍚岄噰鐢ㄧ殑鎶鏈細鏈夋墍宸埆銆?br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " /><a style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #003366; text-decoration: none; "><img title="VCS2" src="http://img.cnbeta.com/newsimg/120427/0810451132929552.png" altwidth="243" style="margin-top: 5px !important; margin-right: auto; margin-bottom: 0px; margin-left: auto; padding-top: 5px; padding-right: 5px; padding-bottom: 5px; padding-left: 5px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-style: initial; border-color: initial; border-image: initial; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-width: initial; clear: both; display: block; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; border-top-left-radius: 6px; border-top-right-radius: 6px; border-bottom-right-radius: 6px; border-bottom-left-radius: 6px; border-top-color: #d4d4d4; border-right-color: #d4d4d4; border-bottom-color: #d4d4d4; border-left-color: #d4d4d4; " alt="" /></a><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " />姣忎釜寮鍙戣呬細鍦ㄤ粬浠殑鏈湴鎷瘋礉涓婅繘琛屽紑鍙戙備粬浠殑鏈湴鎷瘋礉鍩轟簬鐗堟湰“A”銆傜劧鑰岋紝鐢變簬浠栦滑<em style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">搴旇涓嶄細</em>鍋氬悓鏍風殑寮鍙戯紝鍥犺屼粬浠殑鐗堟湰浼氭湁鎵宸埆銆傚洜姝わ紝浼氭湁2涓互涓婄殑鐗堟湰浼氬悓鏃惰鍒涘緩錛屾瘮濡傜増鏈?#8220;B”鍜岀増鏈?#8220;C”銆?br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " /><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " /><a style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #003366; text-decoration: none; "><img title="VCS3" src="http://img.cnbeta.com/newsimg/120427/08104621156274916.png" altwidth="317" style="margin-top: 5px !important; margin-right: auto; margin-bottom: 0px; margin-left: auto; padding-top: 5px; padding-right: 5px; padding-bottom: 5px; padding-left: 5px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-style: initial; border-color: initial; border-image: initial; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-width: initial; clear: both; display: block; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; border-top-left-radius: 6px; border-top-right-radius: 6px; border-bottom-right-radius: 6px; border-bottom-left-radius: 6px; border-top-color: #d4d4d4; border-right-color: #d4d4d4; border-bottom-color: #d4d4d4; border-left-color: #d4d4d4; " alt="" /></a><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " />寮鍙戣?棣栧厛瀹屾垚浜嗗ス鐨勫伐浣滃茍鎻愪氦鍒版湇鍔″櫒銆傛湇鍔″櫒涓婄殑褰撳墠鐗堟湰琚洿鏂版垚鐗堟湰“B”銆?br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " /><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " /><a style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #003366; text-decoration: none; "><img title="VCS4" src="http://img.cnbeta.com/newsimg/120427/08104831137474324.png" altwidth="317" style="margin-top: 5px !important; margin-right: auto; margin-bottom: 0px; margin-left: auto; padding-top: 5px; padding-right: 5px; padding-bottom: 5px; padding-left: 5px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-style: initial; border-color: initial; border-image: initial; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-width: initial; clear: both; display: block; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; border-top-left-radius: 6px; border-top-right-radius: 6px; border-bottom-right-radius: 6px; border-bottom-left-radius: 6px; border-top-color: #d4d4d4; border-right-color: #d4d4d4; border-bottom-color: #d4d4d4; border-left-color: #d4d4d4; " alt="" /></a><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " />寮鍙戣?鐜板湪瀹屾垚浜嗕粬鐨勫伐浣滃茍璇曞浘鎻愪氦鍒版湇鍔″櫒銆傜劧鑰岋紝榪欐槸鏈嶅姟鍣ㄥ憡鐭ヤ粬鍩轟簬寮鍙戠殑鐗堟湰宸茬粡鍙戠敓鏀瑰彉銆?strong style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">榪欎篃鏄負浠涔堥噰鍙栫増鏈帶鍒剁殑棣栬鍘熷洜涔嬩竴銆?/strong>榪欎釜鐗規ф槸瀵圭綉緇滃叡浜唬鐮佺劧鍚庣敱寮鍙戣呮墜鍔ㄦ洿鏂扮殑涓涓法瓚婂紡鍙戝睍錛岃繖紜繚浜嗕箣鍓嶇殑緙栬緫娌℃湁琚柊鐨勪慨鏀硅鐩栥?br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " /><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " /><a style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #003366; text-decoration: none; "><img title="VCS5" src="http://img.cnbeta.com/newsimg/120427/08104941810307228.png" altwidth="396" style="margin-top: 5px !important; margin-right: auto; margin-bottom: 0px; margin-left: auto; padding-top: 5px; padding-right: 5px; padding-bottom: 5px; padding-left: 5px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-style: initial; border-color: initial; border-image: initial; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-width: initial; clear: both; display: block; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; border-top-left-radius: 6px; border-top-right-radius: 6px; border-bottom-right-radius: 6px; border-bottom-left-radius: 6px; border-top-color: #d4d4d4; border-right-color: #d4d4d4; border-bottom-color: #d4d4d4; border-left-color: #d4d4d4; " alt="" /></a><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " />寮鍙戣?蹇呴』棣栧厛鑾峰緱鎵鏈夌増鏈?#8220;B”鐨勫彉鍖栵紝騫跺悎騫跺埌浠栫殑淇敼涓紝鐒跺悗鎵嶅彲浠ユ彁浜ゅ埌鏈嶅姟鍣ㄣ傝繖涓繃紼嬪惉璧鋒潵鏈変簺澶嶆潅銆傜劧鑰岋紝澶у鏁扮幇浠g殑鐗堟湰鎺у埗緋葷粺鍗佸垎楂樼駭錛岃兘澶熻嚜鍔ㄥ湪寮鍙戣呯殑鏈湴鎷瘋礉涓婂畬鎴愬悎騫躲傛湁鍑犵鎯呭喌浼氫駭鐢熷啿紿侊紙渚嬪錛氬紑鍙戣?鍜屽紑鍙戣?鍚屾椂淇敼浜嗗悓涓涓枃浠剁殑鍚屼竴琛岋級銆傝繖灝辨槸涓浜沄CS浜у搧姣斿叾浠栨洿楂樼駭鐨勫湴鏂廣備笉璁哄浣曞畬鎴愬悎騫訛紝鐜板湪寮鍙戣?鍦ㄤ粬浠殑鏈湴緋葷粺涓婂悓鏃舵販鍚堜簡鐗堟湰B鍜岀増鏈珻銆?br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " /><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " /><a style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #003366; text-decoration: none; "><img title="VCS6" src="http://img.cnbeta.com/newsimg/120427/0810515916028618.png" altwidth="459" style="margin-top: 5px !important; margin-right: auto; margin-bottom: 0px; margin-left: auto; padding-top: 5px; padding-right: 5px; padding-bottom: 5px; padding-left: 5px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-style: initial; border-color: initial; border-image: initial; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-width: initial; clear: both; display: block; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; border-top-left-radius: 6px; border-top-right-radius: 6px; border-bottom-right-radius: 6px; border-bottom-left-radius: 6px; border-top-color: #d4d4d4; border-right-color: #d4d4d4; border-bottom-color: #d4d4d4; border-left-color: #d4d4d4; " alt="" /></a><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " />鐜板湪寮鍙戣?鍙互鎻愪氦浠栫殑鐗堟湰鍒版湇鍔″櫒銆?br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " /><a style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #003366; text-decoration: none; "><img title="VCS7" src="http://img.cnbeta.com/newsimg/120427/08105262025047221.png" altwidth="410" style="margin-top: 5px !important; margin-right: auto; margin-bottom: 0px; margin-left: auto; padding-top: 5px; padding-right: 5px; padding-bottom: 5px; padding-left: 5px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-style: initial; border-color: initial; border-image: initial; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-width: initial; clear: both; display: block; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; border-top-left-radius: 6px; border-top-right-radius: 6px; border-bottom-right-radius: 6px; border-bottom-left-radius: 6px; border-top-color: #d4d4d4; border-right-color: #d4d4d4; border-bottom-color: #d4d4d4; border-left-color: #d4d4d4; " alt="" /></a><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " />榪欐槸涓涓増鏈帶鍒剁殑鍩虹銆傞氳繃娉ㄦ剰瑙傚療鍥句腑鏈嶅姟鍣ㄧ殑榪炵嚎鍙互鍙戠幇鐗堟湰鎺у埗鐨勫師鐞嗐傛湇鍔″櫒璁板綍浜嗘墍鏈夊厛鍓嶇殑鐗堟湰鍖呮嫭鍙戠敓鐨勫彉鍖栵紝浠涔堟椂鍊欏彂鐢熶互鍙婄敱璋佽繘琛屼慨鏀廣傚綋闇瑕佽繘琛屼唬鐮佸洖婧垨鑰呭紩鍏ュ叾浠朾ug鏃訛紝榪欎釜璁板綍鑳藉瑙i櫎鍥板銆?br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " />鎴戝笇鏈涙湰鏂囪兘澶熶負鐗堟湰鎺у埗緋葷粺鎻愪緵涓涓熀紜鐨勪粙緇嶃傚鏋滀綘鏈変換浣曠枒闂紝璇峰氨浣犻棶棰樺彂琛ㄨ瘎璁恒?br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " /> <br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " />鑻辨枃鍘熸枃錛?a style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #003366; text-decoration: none; ">greenmoonsoftware </a>緙栬瘧錛?a style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #003366; text-decoration: none; ">浼箰</a>鍦ㄧ嚎 – <a style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #003366; text-decoration: none; ">鍞愬挨鍗?/a></p><img src ="http://www.shnenglu.com/biao/aggbug/172924.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/biao/" target="_blank">閫涘鐨勮湕鐗?/a> 2012-04-27 15:07 <a href="http://www.shnenglu.com/biao/archive/2012/04/27/172924.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>Qt錛歈t姝e垯琛ㄨ揪寮忎腑鍖歸厤涓枃http://www.shnenglu.com/biao/archive/2012/03/04/167118.html閫涘鐨勮湕鐗?/dc:creator>閫涘鐨勮湕鐗?/author>Sun, 04 Mar 2012 08:08:00 GMThttp://www.shnenglu.com/biao/archive/2012/03/04/167118.htmlhttp://www.shnenglu.com/biao/comments/167118.htmlhttp://www.shnenglu.com/biao/archive/2012/03/04/167118.html#Feedback0http://www.shnenglu.com/biao/comments/commentRss/167118.htmlhttp://www.shnenglu.com/biao/services/trackbacks/167118.html QRegExp rx("[\u4e00-\u9fa5]");
    QString str("鎴?...榪欐槸紲為┈");

    QStringList list;
    int pos = 0;

    while ((pos = rx.indexIn(str, pos)) != -1) {
        list << rx.cap(0);
        pos += rx.matchedLength();
    }

    qDebug() << list;
@import url(http://www.shnenglu.com/CuteSoft_Client/CuteEditor/Load.ashx?type=style&file=SyntaxHighlighter.css);@import url(/css/cuteeditor.css);

]]>
Qt錛氱姝Debug鐨勮緭鍑?/title><link>http://www.shnenglu.com/biao/archive/2012/01/16/164244.html</link><dc:creator>閫涘鐨勮湕鐗?/dc:creator><author>閫涘鐨勮湕鐗?/author><pubDate>Mon, 16 Jan 2012 03:50:00 GMT</pubDate><guid>http://www.shnenglu.com/biao/archive/2012/01/16/164244.html</guid><wfw:comment>http://www.shnenglu.com/biao/comments/164244.html</wfw:comment><comments>http://www.shnenglu.com/biao/archive/2012/01/16/164244.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.shnenglu.com/biao/comments/commentRss/164244.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/biao/services/trackbacks/164244.html</trackback:ping><description><![CDATA[鍦ㄥ伐紼嬬殑.pro鏂囦歡閲屽姞涓婁互涓嬬紪璇戞壒浠ゅ嵆鍙細 <div>DEFINES += QT_NO_DEBUG_OUTPUT</div><img src ="http://www.shnenglu.com/biao/aggbug/164244.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/biao/" target="_blank">閫涘鐨勮湕鐗?/a> 2012-01-16 11:50 <a href="http://www.shnenglu.com/biao/archive/2012/01/16/164244.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>Qt錛歈GraphicsEffect浠嬬粛http://www.shnenglu.com/biao/archive/2012/01/14/164168.html閫涘鐨勮湕鐗?/dc:creator>閫涘鐨勮湕鐗?/author>Sat, 14 Jan 2012 06:40:00 GMThttp://www.shnenglu.com/biao/archive/2012/01/14/164168.htmlhttp://www.shnenglu.com/biao/comments/164168.htmlhttp://www.shnenglu.com/biao/archive/2012/01/14/164168.html#Feedback0http://www.shnenglu.com/biao/comments/commentRss/164168.htmlhttp://www.shnenglu.com/biao/services/trackbacks/164168.html

QGraphicsEffect涔熸槸Qt-4.6寮曞叆鐨勪竴涓柊鍔熻兘銆傚畠璁╃粰鍥懼艦鍏冪礌QGraphicsItem澧炲姞鏇翠匠瑙嗚鏁堟灉鐨勭紪紼嬪彉寰楅潪甯哥畝鍗曘?/font>

鍏堟潵鐪嬪嚑寮犳晥鏋滃浘銆?/font>

涓婂浘涓渶涓婇潰鐨勯偅涓浘鐗囨槸娌℃湁浣跨敤QGraphicsEffect澶勭悊鐨勫師鍥撅紝涓嬮潰鐨勫洓涓浘鐗囧垎鍒唬琛ㄤ簡妯$硦錛屽彉鑹詫紝閫忔槑鍜岄槾褰辨晥鏋溿傚搴斾嬌鐢ㄤ簡QGraphicsEffect鐨?涓瓙綾籕GraphicsBlurEffect, QGraphicsColorizeEffect, QGraphicsDropShadowEffect, 鍜?QGraphicsOpacityEffect.涓嬮潰鍒嗗埆浠嬬粛瀹冧滑銆?span id="more-1407" style="line-height: 23px; ">

QGraphicsBlurEffect
璇ョ被鐢ㄥ簲浜х敓妯$硦鏁堟灉,涓昏鍑芥暟setBlurRadius(qreal blurRadius),鐢ㄤ簬鎺у埗鍥懼艦鍏冪礌鐨勬ā緋婂害錛屾暟鍊艱秺澶ц秺妯$硦銆備嬌鐢ㄨ綾諱緥瀛愬涓?/font>

QGraphicsBlurEffect *e0 = new QGraphicsBlurEffect(this);
e0->setBlurRadius(0.2);
item[0]->setGraphicsEffect(e1);//item[0] 涓篞GraphicsItem鎸囬拡

QGraphicsColorizeEffect
璇ョ被鎻愪緵浜嗕嬌鐢ㄥ彟澶栦竴縐嶉鑹插褰撳墠鍥懼艦鐨勪竴縐嶇潃鑹插姛鑳姐備富瑕佸嚱鏁版槸setColor(QColor)鍜宻etStrength (qreal strength)錛屾寚瀹氫簡鐫鑹插拰鐫鑹插己搴︺備嬌鐢ㄨ綾諱緥瀛愬涓?/font>

QGraphicsColorizeEffect *e1 = new QGraphicsColorizeEffect(this);
e1->setColor(QColor(0,0,192));
item[1]->setGraphicsEffect(e1);

QGraphicsDropShadowEffect
璇ョ被鎻愪緵浜嗗浘褰㈠厓绱犵殑闃村獎鏁堟灉錛岀敤浜庡鍔犵珛浣撴劅銆備富瑕佽緗嚱鏁版湁3涓紝setColor()鐢ㄤ簬璁懼畾闃村獎鐨勯鑹?setBlurRadius()鐢ㄤ簬璁懼畾闃村獎鐨勬ā緋婂害錛宻etOffset (qreal dx,qreal dy)鐢ㄤ簬璁懼畾鍦ㄥ摢涓柟鍚戜駭鐢熼槾褰辨晥鏋滐紝濡傛灉dx涓鴻礋鏁幫紝鍒欓槾褰卞湪鍥懼艦鍏冪礌鐨勫乏杈廣備嬌鐢ㄨ綾諱緥瀛愬涓?/font>

QGraphicsDropShadowEffect *e2 = new QGraphicsDropShadowEffect(this);
e2->setOffset(8,8);
item[2]->setGraphicsEffect(e2);

QGraphicsOpacityEffect
璇ョ被鐢ㄤ簬鍥懼艦鍏冪礌鐨勯忔槑鏁堟灉錛屼富瑕佸嚱鏁版槸setOpacity(qreal opacity)錛岀敤浜庤緗忔槑搴︼紝鍙傛暟鍊煎湪0鍜?.0涔嬮棿銆備篃鍙互璁劇疆閮ㄥ垎閫忔槑鏁堟灉錛岄渶瑕佽皟鐢ㄧ殑鍑芥暟鏄痵etOpacityMask (QBrush mask)銆備嬌鐢ㄨ綾諱緥瀛愬涓?/font>

QGraphicsOpacityEffect *e3 = new QGraphicsOpacityEffect(this);
e3->setOpacity(0.7);
item[3]->setGraphicsEffect(e3);

涓嬮潰鎴戞槸鍐欑殑渚嬪瓙浠g爜鍜屾埅鍥俱?/font>

鏈鍚庡煎緱涓鎻愮殑鏄紝榪欎簺鏁堟灉鏄彲浠ヤ簰鐩哥粍鍚堢殑銆傚鏋滆兘鎶婅繖浜涙晥鏋滃拰Qt鐨勫姩鐢籄nimation API緇撳悎璧鋒潵錛屽啓鍑虹殑紼嬪簭灝辨洿婕備寒浜嗐?br style="line-height: 23px; " /> $QTSRC/examples/effect鐩綍涓嬮潰鏈変簺渚嬪瓙鍙互鍙傝冦?/font>


From: http://cowboy.1988.blog.163.com/blog/static/75105798201151311244982/

@import url(http://www.shnenglu.com/CuteSoft_Client/CuteEditor/Load.ashx?type=style&file=SyntaxHighlighter.css);@import url(/css/cuteeditor.css);

]]>
Qt錛氫嬌鐢ㄨ嚜瀹氫箟鐨勫瓧浣?/title><link>http://www.shnenglu.com/biao/archive/2012/01/01/163345.html</link><dc:creator>閫涘鐨勮湕鐗?/dc:creator><author>閫涘鐨勮湕鐗?/author><pubDate>Sun, 01 Jan 2012 06:41:00 GMT</pubDate><guid>http://www.shnenglu.com/biao/archive/2012/01/01/163345.html</guid><wfw:comment>http://www.shnenglu.com/biao/comments/163345.html</wfw:comment><comments>http://www.shnenglu.com/biao/archive/2012/01/01/163345.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/biao/comments/commentRss/163345.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/biao/services/trackbacks/163345.html</trackback:ping><description><![CDATA[1. 涓嬭澆瀛椾綋鏂囦歡 <div>2. 鍔犺澆瀛椾綋鏂囦歡</div> <div>3. 浣跨敤瀛椾綋</div> <div><br /> </div> <div> <pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><!--StartFragment--><span style=" color:#c0c0c0;"> </span><span style=" color:#800080;">QFontDatabase</span><span style=" color:#000000;">::</span>addApplicationFont<span style=" color:#000000;">(</span><span style=" color:#008000;">"XENOTRON.TTF"</span><span style=" color:#000000;">);</span></pre> <pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;"> </span><span style=" color:#800000;">ui</span><span style=" color:#000000;">-></span><span style=" color:#800000;">toolButton_2</span><span style=" color:#000000;">-></span>setFont<span style=" color:#000000;">(</span><span style=" color:#800080;">QFont</span><span style=" color:#000000;">(</span><span style=" color:#008000;">"XENOTRON"</span><span style=" color:#000000;">,</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000080;">34</span><span style=" color:#000000;">));</span><!--EndFragment--></pre> <pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#000000;"><br /> </span></pre> <pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#000000;"><img src="http://www.shnenglu.com/images/cppblog_com/biao/customize-font.png" width="270" height="213" alt="" /></span></pre> </div><img src ="http://www.shnenglu.com/biao/aggbug/163345.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/biao/" target="_blank">閫涘鐨勮湕鐗?/a> 2012-01-01 14:41 <a href="http://www.shnenglu.com/biao/archive/2012/01/01/163345.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>Qt錛歈t璁$畻MD5http://www.shnenglu.com/biao/archive/2011/12/22/162572.html閫涘鐨勮湕鐗?/dc:creator>閫涘鐨勮湕鐗?/author>Thu, 22 Dec 2011 01:45:00 GMThttp://www.shnenglu.com/biao/archive/2011/12/22/162572.htmlhttp://www.shnenglu.com/biao/comments/162572.htmlhttp://www.shnenglu.com/biao/archive/2011/12/22/162572.html#Feedback0http://www.shnenglu.com/biao/comments/commentRss/162572.htmlhttp://www.shnenglu.com/biao/services/trackbacks/162572.html#include <QCryptographicHash>
#include <QDebug>


int main(int argc, char *argv[]) {

    qDebug() << QCryptographicHash::hash("Biao", QCryptographicHash::Md5).toHex().constData();

    return 0;
}


]]>
Qt錛氬幓鎺塓tCreator鎼滅儲閲嶅鐨勭粨鏋?/title><link>http://www.shnenglu.com/biao/archive/2011/12/19/162418.html</link><dc:creator>閫涘鐨勮湕鐗?/dc:creator><author>閫涘鐨勮湕鐗?/author><pubDate>Mon, 19 Dec 2011 12:27:00 GMT</pubDate><guid>http://www.shnenglu.com/biao/archive/2011/12/19/162418.html</guid><wfw:comment>http://www.shnenglu.com/biao/comments/162418.html</wfw:comment><comments>http://www.shnenglu.com/biao/archive/2011/12/19/162418.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/biao/comments/commentRss/162418.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/biao/services/trackbacks/162418.html</trackback:ping><description><![CDATA[渚嬪鎼滅儲QString鏃訛紝浼氬脊鍑轟竴涓獥鍙h閫夋嫨浣跨敤鍝釜鏂囨。閲岀殑QString錛屽緢鐑︿漢錛屽湪璁劇疆閲屽垹闄ら噸澶嶇殑鏂囨。鍗沖彲錛屽鍥継import url(http://www.shnenglu.com/CuteSoft_Client/CuteEditor/Load.ashx?type=style&file=SyntaxHighlighter.css);@import url(/css/cuteeditor.css); <div><img src="http://www.shnenglu.com/images/cppblog_com/biao/qt-help.png" width="796" height="342" alt="" /><br /> </div><img src ="http://www.shnenglu.com/biao/aggbug/162418.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/biao/" target="_blank">閫涘鐨勮湕鐗?/a> 2011-12-19 20:27 <a href="http://www.shnenglu.com/biao/archive/2011/12/19/162418.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>Qt錛歈DirIterator閬嶅巻鐩綍http://www.shnenglu.com/biao/archive/2011/12/02/161309.html閫涘鐨勮湕鐗?/dc:creator>閫涘鐨勮湕鐗?/author>Thu, 01 Dec 2011 16:19:00 GMThttp://www.shnenglu.com/biao/archive/2011/12/02/161309.htmlhttp://www.shnenglu.com/biao/comments/161309.htmlhttp://www.shnenglu.com/biao/archive/2011/12/02/161309.html#Feedback0http://www.shnenglu.com/biao/comments/commentRss/161309.htmlhttp://www.shnenglu.com/biao/services/trackbacks/161309.html闃呰鍏ㄦ枃

]]>
Qt錛歈t Creator涓榪愯宸ョ▼錛屾繪槸緙栬瘧鎵鏈夌殑鏂囦歡http://www.shnenglu.com/biao/archive/2011/11/17/160303.html閫涘鐨勮湕鐗?/dc:creator>閫涘鐨勮湕鐗?/author>Wed, 16 Nov 2011 17:35:00 GMThttp://www.shnenglu.com/biao/archive/2011/11/17/160303.htmlhttp://www.shnenglu.com/biao/comments/160303.htmlhttp://www.shnenglu.com/biao/archive/2011/11/17/160303.html#Feedback0http://www.shnenglu.com/biao/comments/commentRss/160303.htmlhttp://www.shnenglu.com/biao/services/trackbacks/160303.html
宸ョ▼姣忕紪璇戜竴嬈¢兘瑕佸嚑鍒嗛挓錛岄毦涓嶆垚姣忓仛涓鐐逛慨鏀歸兘瑕佺瓑鍑犲垎閽熸墠琛岋紵

鍏堝墠榪欎釜宸ョ▼榪樻槸姝e父鐨勶紝涓轟綍鐜板湪鍗村彉鎴愯繖鏍蜂簡錛熼毦涓嶆垚瑙侀浜嗭紵
涓嶆槸瑙侀錛屽洜鏋滃驚鐜紝鍙槸鎴戜滑娌℃湁鎵懼埌鍘熷洜緗簡銆?/div>

Qt Creator always rebuild all the files in the project錛屽湪Google涓婃悳绱㈣繖鍙ヨ瘽錛屽緱鍒板敮涓鐩稿叧鐨勭瓟妗堟槸 " I have forgot adjust the date and time settings."錛屾病鏈夋壘鍒板叾浠栨湁鐢ㄧ殑淇℃伅浜嗭紝浣嗛噸瑕佺殑涓鐐規槸鏃犳剰涓湅鍒頒簡鏃墮棿璁劇疆榪欎釜鍏抽敭錛屾壘浜哘t Creator鐩稿叧璁劇疆錛屾病鏈夊晩銆?/div>

鍚庢潵瑙傚療鏂囦歡鐨勫睘鎬э紝鍙戠幇榪樼湡鏄椂闂寸殑闂錛屼緥濡傜幇鍦ㄦ槸2011錛?1錛?6錛岃岄偅浜涙枃浠剁殑淇敼鏃墮棿鏄?011錛?2錛?4錛屽師鏉ョ敱浜庢祴璇曠殑闇瑕侊紝鎴戞妸緋葷粺鐨勬椂闂磋皟鍒頒簡2011錛?2錛?4錛屼慨鏀圭▼搴忥紝鐒跺悗鍐嶆祴璇曪紝榪欐牱寰堝鏂囦歡鐨勪慨鏀規椂闂撮兘鏄?011錛?2錛?4浜嗭紝鍐嶈皟鍥炲埌2011錛?1錛?6錛屽湪Qt Creator涓繍琛屽伐紼嬫椂錛孮t Creator鍏堟煡鐪嬩簡鏂囦歡鐨勪慨鏀規椂闂達紝璁や負榪欎簺鏂囦歡閮芥槸淇敼榪囩殑錛屾墍浠ラ兘瑕佺紪璇戜竴嬈★紝鐒跺悗鎵嶈繍琛屻?/div>

涓轟簡楠岃瘉榪欎釜鎯蟲硶錛屾妸緋葷粺鏃墮棿鍐嶈皟鍒?011錛?2錛?4浠ュ悗錛屽啀榪愯宸ョ▼錛屼竴鍒囨甯鎬簡錛屾病鏈変慨鏀硅繃鐨勬枃浠跺氨涓嶄細鍐嶇紪璇戜簡錛屽搸錛屼笟鍔′笉鐔燂紝瀹蟲浜恒?/div>

]]>Qt錛氭瀬鑷寸殑鍏擱泤錛孲tyle sheethttp://www.shnenglu.com/biao/archive/2011/11/10/159897.html閫涘鐨勮湕鐗?/dc:creator>閫涘鐨勮湕鐗?/author>Wed, 09 Nov 2011 18:14:00 GMThttp://www.shnenglu.com/biao/archive/2011/11/10/159897.htmlhttp://www.shnenglu.com/biao/comments/159897.htmlhttp://www.shnenglu.com/biao/archive/2011/11/10/159897.html#Feedback1http://www.shnenglu.com/biao/comments/commentRss/159897.htmlhttp://www.shnenglu.com/biao/services/trackbacks/159897.html @import url(http://www.shnenglu.com/CuteSoft_Client/CuteEditor/Load.ashx?type=style&file=SyntaxHighlighter.css);@import url(/css/cuteeditor.css);

]]>
Qt錛氫嬌鐢ㄧ郴緇熼粯璁ょ殑紼嬪簭鎵撳紑瀵瑰簲鐨勬枃浠?/title><link>http://www.shnenglu.com/biao/archive/2011/11/04/159617.html</link><dc:creator>閫涘鐨勮湕鐗?/dc:creator><author>閫涘鐨勮湕鐗?/author><pubDate>Fri, 04 Nov 2011 06:29:00 GMT</pubDate><guid>http://www.shnenglu.com/biao/archive/2011/11/04/159617.html</guid><wfw:comment>http://www.shnenglu.com/biao/comments/159617.html</wfw:comment><comments>http://www.shnenglu.com/biao/archive/2011/11/04/159617.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/biao/comments/commentRss/159617.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/biao/services/trackbacks/159617.html</trackback:ping><description><![CDATA[<!--?xml version="1.0" encoding="UTF-8" standalone="no"?--> <span style="border-collapse: collapse; color: #333333; font-family: Arial; ">QDesktopServices鎻愪緵浜嗕竴浜涚郴緇熺浉鍏崇殑鍔熻兘銆?/span> <div><span style="font-family: Arial; line-height: normal; font-size: medium; "><span style="border-collapse: separate; color: #000000; font-family: 'Hiragino Sans GB'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; "><span style="border-collapse: collapse; color: #333333; font-family: Arial; font-size: 14px; line-height: 21px; "><br /> </span></span></span></div> <div><span style="font-family: Arial; line-height: normal; font-size: medium; "><span style="border-collapse: separate; color: #000000; font-family: 'Hiragino Sans GB'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; "><span style="border-collapse: collapse; color: #333333; font-family: Arial; font-size: 14px; line-height: 21px; ">鎵撳紑妗岄潰涓婄殑1.mp4瑙嗛鏂囦歡<br style="outline-style: none; outline-width: initial; outline-color: initial; " /> QDesktopServices::openUrl(QUrl("file:////Users/Biao/Desktop/1.mp4"));<br style="outline-style: none; outline-width: initial; outline-color: initial; " /> <br style="outline-style: none; outline-width: initial; outline-color: initial; " /> </span></span></span> <div style="font-family: Arial; line-height: normal; font-size: medium; "><span style="border-collapse: collapse; color: #333333; font-size: 14px; line-height: 21px; ">The openUrl() function is used to open files located at arbitrary URLs in external applications. For URLs that correspond to resources on the local filing system (where the URL scheme is "file"), a suitable application will be used to open the file; otherwise, a web browser will be used to fetch and display the file.</span></div> @import url(http://www.shnenglu.com/CuteSoft_Client/CuteEditor/Load.ashx?type=style&file=SyntaxHighlighter.css);@import url(/css/cuteeditor.css); </div><img src ="http://www.shnenglu.com/biao/aggbug/159617.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/biao/" target="_blank">閫涘鐨勮湕鐗?/a> 2011-11-04 14:29 <a href="http://www.shnenglu.com/biao/archive/2011/11/04/159617.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>Qt錛氬垎欏電粍浠?/title><link>http://www.shnenglu.com/biao/archive/2011/10/30/159350.html</link><dc:creator>閫涘鐨勮湕鐗?/dc:creator><author>閫涘鐨勮湕鐗?/author><pubDate>Sun, 30 Oct 2011 04:31:00 GMT</pubDate><guid>http://www.shnenglu.com/biao/archive/2011/10/30/159350.html</guid><wfw:comment>http://www.shnenglu.com/biao/comments/159350.html</wfw:comment><comments>http://www.shnenglu.com/biao/archive/2011/10/30/159350.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.shnenglu.com/biao/comments/commentRss/159350.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/biao/services/trackbacks/159350.html</trackback:ping><description><![CDATA[@import url(http://www.shnenglu.com/CuteSoft_Client/CuteEditor/Load.ashx?type=style&file=SyntaxHighlighter.css);@import url(/css/cuteeditor.css); <img src="http://www.shnenglu.com/images/cppblog_com/biao/page.png" width="595" height="220" alt="" />  <div><br /> </div> <div>浣跨敤闈炲父綆鍗?</div> <div> <pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><!--StartFragment--><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">//</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">鎶婂垎欏電粍浠跺姞鍏ュ埌褰撳墠紿楀彛</span></pre> <pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;"> </span><span style=" color:#800000;">pageWidget</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">=</span><span style=" color:#c0c0c0;"> </span><span style=" color:#808000;">new</span><span style=" color:#c0c0c0;"> </span><span style=" color:#800080;">PageWidget</span><span style=" color:#000000;">();</span></pre> <pre style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "><span style=" color:#c0c0c0;"> </span>layout<span style=" color:#000000;">()-></span>addWidget<span style=" color:#000000;">(</span><span style=" color:#800000;">pageWidget</span><span style=" color:#000000;">);</span></pre> <pre style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "><span style=" color:#000000;"> </span></pre> <pre style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "><span style=" color:#000000;">褰撴婚〉鏁版敼鍙樻椂(濡傛煡璇㈡暟鎹簱鎿嶄綔寰楀埌鎬婚〉鏁?錛屽彧闇瑕佽皟鐢╬ageWidget鐨勪袱涓嚱鏁?/span></pre> <pre style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "> <pre style="color: #000000; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "><!--StartFragment--><span style=" color:#808000;">void</span><span style=" color:#c0c0c0;"> </span><span style=" color:#800080;">Widget</span><span style=" color:#000000;">::</span>changeMaxPage<span style=" color:#000000;">()</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">{</span></pre> <pre style="color: #000000; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "><span style=" color:#c0c0c0;"> </span><span style=" color:#800000;">pageWidget</span><span style=" color:#000000;">-></span>setMaxPage<span style=" color:#000000;">(</span><span style=" color:#800000;">ui</span><span style=" color:#000000;">-></span><span style=" color:#800000;">lineEdit</span><span style=" color:#000000;">-></span>text<span style=" color:#000000;">().</span>toInt<span style=" color:#000000;">());</span></pre> <pre style="color: #000000; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "><span style=" color:#c0c0c0;"> </span><span style=" color:#800000;">pageWidget</span><span style=" color:#000000;">-></span>setCurrentPage<span style=" color:#000000;">(</span><span style=" color:#000080;">1</span><span style=" color:#000000;">);</span></pre> <pre style="color: #000000; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "><span style=" color:#000000;">}</span><!--EndFragment--></pre> <pre style="color: #000000; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "><span style=" color:#000000;"><br /> </span></pre> <pre style="color: #000000; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "><span style=" color:#000000;">褰損ageWidget涓婄殑欏電爜琚偣鍑誨悗錛屼細鍙戝皠</span><span style=" color:#808000;">void</span><span style=" color:#c0c0c0;"> </span>currentPageChanged<span style=" color:#000000;">(</span><span style=" color:#808000;">int</span><span style=" color:#c0c0c0;"> </span>page<span style=" color:#000000;">)</span>淇″彿錛岀劧鍚庝富紿楀彛閲屽啀浣滃嚭鐩稿簲鍙嶅簲錛屽鏌ヨ鍒嗛〉鏌ヨ鏁版嵁搴?/pre> <pre style="color: #000000; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "><br /> </pre> <pre style="color: #000000; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; ">宸ョ▼鏂囦歡涓嬭澆錛?a href="/Files/biao/MultiPageDemo.7z">/Files/biao/MultiPageDemo.7z</a></pre> </pre> </div><img src ="http://www.shnenglu.com/biao/aggbug/159350.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/biao/" target="_blank">閫涘鐨勮湕鐗?/a> 2011-10-30 12:31 <a href="http://www.shnenglu.com/biao/archive/2011/10/30/159350.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>Qt錛歐indows涓嬬紪璇慚ySql椹卞姩http://www.shnenglu.com/biao/archive/2011/10/29/159296.html閫涘鐨勮湕鐗?/dc:creator>閫涘鐨勮湕鐗?/author>Fri, 28 Oct 2011 16:58:00 GMThttp://www.shnenglu.com/biao/archive/2011/10/29/159296.htmlhttp://www.shnenglu.com/biao/comments/159296.htmlhttp://www.shnenglu.com/biao/archive/2011/10/29/159296.html#Feedback0http://www.shnenglu.com/biao/comments/commentRss/159296.htmlhttp://www.shnenglu.com/biao/services/trackbacks/159296.html
Mac OS X緙栬瘧瀹夎MySql鏄歡闈炲父杞繪澗鐨勬椿錛屽湪Windows閲屽嵈鑺變簡寰堜箙銆?

緋葷粺: Windows
Qt: 鐩存帴浣跨敤Qt SDK瀹夎鐨勶紝鎵浠ュ緱鎵嬪姩鎶奲in鐩綍璁劇疆鍒扮幆澧冭礬寰勪笅
Mysql: 涓嬭澆鏈鏂扮ぞ鍖虹増
榛勮壊鑳屾櫙閮ㄥ垎涓哄叧閿儴鍒?/div>

鎬葷殑姝ラ錛?/span>
1. 鐢熸垚mingw浣跨敤鐨刴ysql鐨刲ibmysql.a鏂囦歡
2. qmake鐢熸垚mysql.pro鏂囦歡
3. 鎶奿ncludepath鍜宭ibs鐨勫唴瀹瑰姞鍏ュ埌mysql.pro鏂囦歡
4. make, make release 鐢熸垚mysql鐨勯┍鍔ㄦ枃浠?/div>
5. 澶嶅埗鐢熸垚鐨勯┍鍔ㄦ枃浠跺埌qt鐨勬暟鎹簱椹卞姩鏂囦歡澶?/div>
6. 澶嶅埗mysql鐨刲ib/libmysql.dll鍒皅t鐨刡in鏂囦歡澶?/div>

MySQL: 瀹夎鏃朵笉瑕佺敤緇忓吀瀹夎錛岄夋嫨瀹屽叏瀹夎鎴栬呰嚜瀹氫箟鎶婂ご鏂囦歡鍜屽簱鍕鵑変笂錛岃繖鏍峰畨瑁呭悗浼氭湁for c/c++鐨勫ご鏂囦歡鍜屽簱鐩綍錛孧ySql鎴戝氨瀹夎鍦–鐩樻牴鐩綍涓嬩簡

鍥犱負榪欓噷鎴戜滑浣跨敤MinGW鏉ョ紪璇戦┍鍔紝mysql鎻愪緵鐨勮繖涓猯ibmysql.lib鎴戜滑榪樹笉鑳界洿鎺ョ敤(濡傛灉鐢ㄥ井杞殑緙栬瘧鍣ㄥ氨涓嶇敤榪欐牱浜嗭級錛屾垜浠渶瑕佺敤涓伐鍏瘋漿鎴?.a鏉ョ敤銆?/p>

宸ュ叿涓嬭澆錛?span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: #333333; font-family: Arial; font-size: 14px; line-height: 26px; "> http://www.qtcn.org/download/mingw-utils-0.3.tar.gz

瑙e帇鎴戜滑鍙敤remip.exe榪欎釜涓滆タ錛屾妸浠栨斁鍦ㄤ綘鐨刴ingw/bin鍜岄偅浜沵ake.exe鏀句竴璧峰氨琛屻?/span>

cd C:/mysql/lib

reimp -d libmysql.lib (鐢熸垚 libmysql.def鏂囦歡)

dlltool -k -d libmysql.def -l libmysql.a (鐢熸垚 libmysql.a鏂囦歡)

over浜嗭紝鍑烘潵榪?涓笢瑗夸簡銆?/p>

濂戒簡闇瑕佺殑libmysql.a鍑嗗濂戒簡

涓嬮潰寮濮嬬紪璇戜箣鏃咃細

鏉ュ埌qt mysql椹卞姩鐨勬簮紼嬪簭鐩綍錛屾湁涓猚pp鏂囦歡鍜屼竴涓猶t欏圭洰鏂囦歡銆?/p>

cd %QTDIR%/src/plugins/sqldrivers/mysql 錛?/span>褰撳墠鐩綍杞埌婧愮▼搴忕洰褰曪級

qmake -o Makefile "INCLUDEPATH+=C:/mysql/include" "LIBS+=C:/mysql/lib/libmysql.a" mysql.pro

錛?span style="color: red; ">濡傛灉浣犵殑mysql瀹夎鍦ㄥ叾浠栧湴鏂癸紝濡傛灉璺緞涓婃湁絀烘牸涔嬬被鐨勶紝鐩存帴澶嶅埗include鍜宭ib鐩綍鍒癈鐩樻牴鐩綍涓嬬殑mysql鐩綍濂戒簡錛屾柟渚夸竴浼氬啓璺緞銆傦級

鎺ヤ笅鏉ョ殑姝ラ寰堝叧閿紝寮濮嬬殑鏃跺欐病鏈変嬌鐢ㄤ笅闈㈢殑鏂瑰紡錛屽紕浜嗗緢涔呴兘涓嶈銆?/p>

鍦ㄥ垰鍒氱敓鎴愮殑mysql.pro涓姞鍏ヤ互涓嬶細

INCLUDEPATH+="C:/mysql/include"
LIBS+="C:/mysql/lib/libmysql.lib"
HEADERS =../../../sql/drivers/mysql/qsql_mysql.h
SOURCES = main.cpp\
          ../../../sql/drivers/mysql/qsql_mysql.cpp


鐒跺悗

make

make release

鑷蟲鍦╠ebug鍜宺elease鐩綍閲岀敓鎴愪簡涓嬮潰鐨勮繖鍥涗釜鏂囦歡


澶嶅埗涓婇潰鐨勮繖4涓枃浠跺埌qt鐨刾lugins/sqldrivers鐩綍錛氫緥濡傛垜鐨勶細C:/QtSDK/Desktop/Qt/4.7.4/mingw/plugins/sqldrivers

鍚屾椂涔熻鎶妋ysql/lib/libmysql.dll榪欎釜鏂囦歡澶嶅埗鍒皅t鐨刡in鐩綍錛氫緥濡傛垜鐨勶細C:/QtSDK/Desktop/Qt/4.7.4/mingw/bin


From: http://xcf007.blog.51cto.com/471707/672917, http://hi.baidu.com/bodogbo/blog/item/e1ac85d156a88c1b3bf3cf76.html

 





]]>Qt錛氬厤璐圭殑MySQL綆$悊瀹㈡埗绔?/title><link>http://www.shnenglu.com/biao/archive/2011/10/28/159288.html</link><dc:creator>閫涘鐨勮湕鐗?/dc:creator><author>閫涘鐨勮湕鐗?/author><pubDate>Fri, 28 Oct 2011 14:47:00 GMT</pubDate><guid>http://www.shnenglu.com/biao/archive/2011/10/28/159288.html</guid><wfw:comment>http://www.shnenglu.com/biao/comments/159288.html</wfw:comment><comments>http://www.shnenglu.com/biao/archive/2011/10/28/159288.html#Feedback</comments><slash:comments>7</slash:comments><wfw:commentRss>http://www.shnenglu.com/biao/comments/commentRss/159288.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/biao/services/trackbacks/159288.html</trackback:ping><description><![CDATA[<div style="text-align: left;"><span style="border-collapse: collapse; font-family: 'Lucida Grande', Calibri, 'Trebuchet MS', Helvetica, Arial, 'Hiragino Sans GB', 'WenQuanYi Micro Hei', STHeiti, 'Microsoft Jhenghei', sans-serif; font-size: 13px; ">瀹樻柟绔欓粸錛?a target="_blank" style="word-wrap: break-word; text-decoration: none; color: #355491; line-height: normal; ">http://www.sequelpro.com</a></span></div> <span style="border-collapse: collapse; font-family: 'Lucida Grande', Calibri, 'Trebuchet MS', Helvetica, Arial, 'Hiragino Sans GB', 'WenQuanYi Micro Hei', STHeiti, 'Microsoft Jhenghei', sans-serif; font-size: 13px; "><br style="word-wrap: break-word; line-height: normal; " /> Sequel Pro 鐨勫師鍚嶆槸 CocoaMySQL錛屾槸涓涓笌 phpMyAdmin 欏炰技鐨?MySQL 綆$悊<span href="tag.php?name=%B9%A4%BE%DF" class="t_tag" style="word-wrap: break-word; line-height: normal; border-bottom-width: 1px; border-bottom-style: dotted; border-bottom-color: #aaaaaa; cursor: pointer; white-space: nowrap; ">宸ュ叿</span>銆傚畠鏄敱 Cocoa 鍜岄潰瀵瑰璞$殑C錛?span href="tag.php?name=Mac" class="t_tag" style="word-wrap: break-word; line-height: normal; border-bottom-width: 1px; border-bottom-style: dotted; border-bottom-color: #aaaaaa; cursor: pointer; white-space: nowrap; ">Mac</span> OS X錛夌紪鍐欑殑銆係equel Pro 鍏佽浣犵紪杈戞暟鎹簱錛岃〃鏍鹼紙瀛楁鍜岀儲寮曪級鍜屽垪錛屾墽琛屼釜鎬у寲鏌ユ壘鍜屽鍏ュ鍑烘暟鎹?br style="word-wrap: break-word; line-height: normal; " /> <br style="word-wrap: break-word; line-height: normal; " /> <img src="http://mac.pcbeta.com/attachments/month_0909/09090321199c13122b7538aeef.jpg" file="attachments/month_0909/09090321199c13122b7538aeef.jpg" width="600" id="aimg_2613" alt="铻㈠箷蹇収 2009-09-04 涓婂崍9.06.48.jpg" class="" style="word-wrap: break-word; line-height: normal; border-top-left-radius: 3px 3px; border-top-right-radius: 3px 3px; border-bottom-right-radius: 3px 3px; border-bottom-left-radius: 3px 3px; " /> <br style="word-wrap: break-word; line-height: normal; " /> <br style="word-wrap: break-word; line-height: normal; " /> <img src="http://mac.pcbeta.com/attachments/month_0909/09090321192d3d293868347e4a.jpg" file="attachments/month_0909/09090321192d3d293868347e4a.jpg" width="600" id="aimg_2614" alt="铻㈠箷蹇収 2009-09-04 涓婂崍9.05.39.jpg" class="" style="word-wrap: break-word; line-height: normal; border-top-left-radius: 3px 3px; border-top-right-radius: 3px 3px; border-bottom-right-radius: 3px 3px; border-bottom-left-radius: 3px 3px; " /> <br style="word-wrap: break-word; line-height: normal; " /> <br style="word-wrap: break-word; line-height: normal; " /> <strong style="word-wrap: break-word; text-align: left; font-style: normal; line-height: normal; font-weight: bold; ">娉細鐩墠鍦嬪収澶ч儴鍒嗚櫅鎿富姍熸湇鍕欐彁渚涘晢娌掓湁闁嬪晸MySQL鐨勯仩绔g窔<span href="tag.php?name=%B9%A6%C4%DC" class="t_tag" style="word-wrap: break-word; line-height: normal; border-bottom-width: 1px; border-bottom-style: dotted; border-bottom-color: #aaaaaa; cursor: pointer; white-space: nowrap; ">鍔熻兘</span>錛屽鏋滄偍浣跨敤鐨勬槸VPS鎴栫崹绔嬩己鏈嶅櫒錛岄渶瑕佷慨鏀?my.cnf (*Unix) my.ini (<span href="tag.php?name=Windows" class="t_tag" style="word-wrap: break-word; line-height: normal; border-bottom-width: 1px; border-bottom-style: dotted; border-bottom-color: #aaaaaa; cursor: pointer; white-space: nowrap; ">Windows</span>) 鍏у弮鏁革紝鎵嶈兘鍦ㄦ湰鍦頒嬌鐢ㄦ杌熼珨閫g窔綆$悊璩囨枡搴?/strong><br style="word-wrap: break-word; line-height: normal; " /> <br style="word-wrap: break-word; line-height: normal; " /> <strong style="word-wrap: break-word; text-align: left; font-style: normal; line-height: normal; font-weight: bold; ">涓嬭級鍦板潃錛?a target="_blank" style="word-wrap: break-word; text-decoration: none; color: #355491; line-height: normal; ">http://sequel-pro.googlecode.com/files/sequel-pro-0.9.6.dmg</a></strong></span> @import url(http://www.shnenglu.com/CuteSoft_Client/CuteEditor/Load.ashx?type=style&file=SyntaxHighlighter.css);@import url(/css/cuteeditor.css); <div><span style="border-collapse: collapse; font-family: 'Lucida Grande', Calibri, 'Trebuchet MS', Helvetica, Arial, 'Hiragino Sans GB', 'WenQuanYi Micro Hei', STHeiti, 'Microsoft Jhenghei', sans-serif; font-size: 13px; "><br /> </span></div> <div><span style="border-collapse: collapse; font-family: 'Lucida Grande', Calibri, 'Trebuchet MS', Helvetica, Arial, 'Hiragino Sans GB', 'WenQuanYi Micro Hei', STHeiti, 'Microsoft Jhenghei', sans-serif; font-size: 13px; ">From錛歨ttp://mac.pcbeta.com/thread-2562-1-1.html</span></div><img src ="http://www.shnenglu.com/biao/aggbug/159288.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/biao/" target="_blank">閫涘鐨勮湕鐗?/a> 2011-10-28 22:47 <a href="http://www.shnenglu.com/biao/archive/2011/10/28/159288.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>Qt錛歁ac涓嬌鐢ㄥ帇緙╁寘鐨刴ysql(闈炲畨瑁呯増)http://www.shnenglu.com/biao/archive/2011/10/28/159284.html閫涘鐨勮湕鐗?/dc:creator>閫涘鐨勮湕鐗?/author>Fri, 28 Oct 2011 13:21:00 GMThttp://www.shnenglu.com/biao/archive/2011/10/28/159284.htmlhttp://www.shnenglu.com/biao/comments/159284.htmlhttp://www.shnenglu.com/biao/archive/2011/10/28/159284.html#Feedback0http://www.shnenglu.com/biao/comments/commentRss/159284.htmlhttp://www.shnenglu.com/biao/services/trackbacks/159284.html2. 瑙e帇錛岀劧鍚庡鍒跺埌/usr/local 鐩綍涓?/div>
3. 淇敼 /usr/local/mysql鐨勬墍鏈夎呬負mysql錛?chown -R mysql:mysql mysql (鍙嶆鏄繖涓姝ョ粰鍋氫簡錛屼笉鐭ラ亾鏄笉鏄繀欏葷殑)
4. 瀹夎mysql ? : sudo /usr/local/mysql/scripts/mysql_install_db 
5. 鑷蟲錛屽彲浠ヨ繍琛宮ysql鏈嶅姟鍣ㄧ浜? sudo /usr/local/mysql/bin/mysqld_safe &   (&鍦║nix緋葷粺閲屽茍涓嶄細鍦ㄥ悗鍙拌繍琛岋紝灝ゅ叾鏄嬌鐢ㄥ儚tomcat鏃墮潪甯告湁鐢紝鍙互鐪嬪緱鍒拌緭鍑虹殑淇℃伅)

6. 榪愯mysql瀹㈡埛绔? /usr/local/mysql/bin/mysql -u root -p


]]>
久久久av波多野一区二区| 久久亚洲精品视频| 99久久这里只精品国产免费 | 久久综合狠狠色综合伊人| 日韩精品国产自在久久现线拍| 99久久免费国产精品| 欧美精品一区二区久久| 国产69精品久久久久久人妻精品| 久久精品天天中文字幕人妻| 国产国产成人久久精品| 漂亮人妻被中出中文字幕久久 | 国产精品免费看久久久| 国产成人精品久久亚洲| 久久99热这里只有精品66| 国内精品久久久久影院日本| 热RE99久久精品国产66热| 久久w5ww成w人免费| 日本久久中文字幕| 99999久久久久久亚洲| 欧美伊人久久大香线蕉综合| 国产激情久久久久影院老熟女免费 | 国产精品一久久香蕉产线看| 久久播电影网| 99久久99久久| 亚洲AV日韩精品久久久久久久| 久久国产综合精品五月天| 久久国产亚洲精品无码| 久久精品国产亚洲AV影院| 久久婷婷人人澡人人| 久久亚洲精品视频| 国产精品国色综合久久| 亚洲国产精品久久电影欧美| 亚洲午夜久久久| 亚州日韩精品专区久久久| 精品无码人妻久久久久久| 99久久综合国产精品二区| 久久99国产精一区二区三区| 国内精品久久久久影院日本| 精品久久8x国产免费观看| 人妻精品久久久久中文字幕一冢本 | 国产精品一区二区久久国产|