当前位置: 首页>>代码示例>>PHP>>正文


PHP QString::fromUtf8方法代码示例

本文整理汇总了PHP中QString::fromUtf8方法的典型用法代码示例。如果您正苦于以下问题:PHP QString::fromUtf8方法的具体用法?PHP QString::fromUtf8怎么用?PHP QString::fromUtf8使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在QString的用法示例。


在下文中一共展示了QString::fromUtf8方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: setupUi

 public function setupUi($Dialog)
 {
     if ($Dialog->objectName()->isEmpty()) {
         $Dialog->setObjectName(QString::fromUtf8("Dialog"));
     }
     $size = new QSize(394, 311);
     $size = $size->expandedTo($Dialog->minimumSizeHint());
     $Dialog->resize($size);
     $this->buttonBox = new QDialogButtonBox($Dialog);
     $buttonBox = $this->buttonBox;
     // scope
     $buttonBox->setObjectName(QString::fromUtf8("buttonBox"));
     $buttonBox->setGeometry(new QRect(40, 270, 341, 32));
     $buttonBox->setOrientation(Qt::Horizontal);
     $buttonBox->setStandardButtons(QDialogButtonBox::Cancel | QDialogButtonBox::NoButton | QDialogButtonBox::Ok);
     $this->textBrowser = new QTextBrowser($Dialog);
     $textBrowser = $this->textBrowser;
     // scope
     $textBrowser->setObjectName(QString::fromUtf8("textBrowser"));
     $textBrowser->setGeometry(new QRect(10, 10, 371, 211));
     $this->lineEdit = new QLineEdit($Dialog);
     $lineEdit = $this->lineEdit;
     // scope
     $lineEdit->setObjectName(QString::fromUtf8("lineEdit"));
     $lineEdit->setGeometry(new QRect(10, 230, 371, 25));
     $this->retranslateUi($Dialog);
     QObject::connect($buttonBox, SIGNAL('accepted()'), $Dialog, SLOT('accept()'));
     QObject::connect($buttonBox, SIGNAL('rejected()'), $Dialog, SLOT('reject()'));
     QMetaObject::connectSlotsByName($Dialog);
 }
开发者ID:0xd34df00d,项目名称:Qross,代码行数:30,代码来源:ui_designer.php

示例2: __construct

 public function __construct()
 {
     parent::__construct();
     $this->layout = new QVBoxLayout($this);
     // Load the test xml
     $unicodeXml = new DOMDocument();
     $unicodeXml->load("unicode.xml");
     $xpath = new DOMXPath($unicodeXml);
     $dataNodes = $xpath->query("/test/data");
     // Loop on all data node and create buttons
     foreach ($dataNodes as $data) {
         $this->buttons[] = new QLineEdit(QString::fromUtf8($data->nodeValue, -1), $this);
         foreach ($data->attributes as $attribute) {
             $this->layout->addWidget(new QLabel($attribute->name . ": " . $attribute->value));
         }
         $this->layout->addWidget($this->buttons[count($this->buttons) - 1]);
     }
     $this->buttons[] = new QLineEdit("Test", $this);
     $this->layout->addWidget($this->buttons[count($this->buttons) - 1]);
     $this->buttons[] = new QLineEdit("second Test", $this);
     $this->layout->addWidget($this->buttons[count($this->buttons) - 1]);
 }
开发者ID:Shadrackn,项目名称:php-qt,代码行数:22,代码来源:unicode.php


注:本文中的QString::fromUtf8方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。