• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            逛奔的蝸牛

            我不聰明,但我會很努力

               ::  :: 新隨筆 ::  ::  :: 管理 ::


            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.


            posted on 2013-09-02 17:48 逛奔的蝸牛 閱讀(2889) 評論(0)  編輯 收藏 引用 所屬分類: Qt
            99久久婷婷免费国产综合精品| 久久精品国产亚洲麻豆| 久久综合狠狠综合久久97色| 久久涩综合| 国产偷久久久精品专区| 久久国产精品99久久久久久老狼| 久久青青草原国产精品免费| 亚洲精品乱码久久久久久蜜桃 | 国产精品免费看久久久香蕉| 人人狠狠综合88综合久久| 色综合久久久久无码专区| 国产综合精品久久亚洲| 精品久久久久久中文字幕大豆网 | 伊人久久一区二区三区无码| 一本色道久久综合亚洲精品| 久久久久久亚洲精品无码| 熟妇人妻久久中文字幕| 久久久久久A亚洲欧洲AV冫| 亚洲va久久久噜噜噜久久| 久久涩综合| 久久久久国产亚洲AV麻豆| 久久国产精品无码HDAV| 思思久久好好热精品国产| 亚洲国产精品人久久| 99久久精品国产高清一区二区| 久久久亚洲裙底偷窥综合| 久久婷婷五月综合97色直播| 久久精品男人影院| 97久久天天综合色天天综合色hd| 国产精品久久久久久久久软件| 国产精品无码久久四虎| A级毛片无码久久精品免费| 久久99精品国产| 免费观看久久精彩视频| 69国产成人综合久久精品| 久久av无码专区亚洲av桃花岛| 久久这里只有精品首页| 中文字幕日本人妻久久久免费 | 天天做夜夜做久久做狠狠| 要久久爱在线免费观看| 综合久久国产九一剧情麻豆|