public function __construct() { parent::__construct(); $quit = new QPushButton(tr("&Quit")); $quit->setFont(new QFont("Times", 18, QFont::Bold)); QObject::connect($quit, SIGNAL('clicked()'), QApplication::instance(), SLOT('quit()')); $angle = new LCDRange(); $angle->setRange(5, 70); $force = new LCDRange(); $force->setRange(10, 50); $cannonField = new CannonField(); QObject::connect($angle, SIGNAL('valueChanged(int)'), $cannonField, SLOT('setAngle(int)')); QObject::connect($cannonField, SIGNAL('angleChanged(int)'), $angle, SLOT('setValue(int)')); QObject::connect($force, SIGNAL('valueChanged(int)'), $cannonField, SLOT('setForce(int)')); QObject::connect($cannonField, SIGNAL('forceChanged(int)'), $force, SLOT('setValue(int)')); $shoot = new QPushButton(tr("&Shoot")); $shoot->setFont(new QFont("Times", 18, QFont::Bold)); QObject::connect($shoot, SIGNAL('clicked()'), $cannonField, SLOT('shoot()')); $topLayout = new QHBoxLayout(); $topLayout->addWidget($shoot); $topLayout->addStretch(1); $leftLayout = new QVBoxLayout(); $leftLayout->addWidget($angle); $leftLayout->addWidget($force); $gridLayout = new QGridLayout(); $gridLayout->addWidget($quit, 0, 0); $gridLayout->addLayout($topLayout, 0, 1); $gridLayout->addLayout($leftLayout, 1, 0); $gridLayout->addWidget($cannonField, 1, 1, 2, 1); $gridLayout->setColumnStretch(1, 10); $this->setLayout($gridLayout); $angle->setValue(60); $force->setValue(25); $angle->setFocus(); }
public function __construct() { parent::__construct(); $this->textEdit_static_text = tr('Downloading PQPack package'); $this->setWindowFlags(Qt::MSWindowsFixedSizeDialogHint | Qt::WindowStaysOnTopHint | Qt::WindowTitleHint); $this->downloader = new PQFileDownloader(); $this->downloader->connect(SIGNAL('downloaded()'), $this, SLOT('downloaded()')); $this->downloader->connect(SIGNAL('downloadProgress(qint64,qint64)'), $this, SLOT('downloadProgress(qint64,qint64)')); $this->textEdit = new QTextEdit($this); $this->textEdit->html = $this->textEdit_static_text . '... (0Kb of 0Kb)'; $this->textEdit->readOnly = true; $this->textEdit->minimumHeight = $this->textEdit->maximumHeight = 80; $this->progressBar = new QProgressBar($this); $this->progressBar->setMinimumSize(450, 30); $this->button = new QPushButton($this); $this->button->text = tr('Continue'); $this->button->enabled = false; $this->button->connect(SIGNAL('clicked()'), $this, SLOT('close()')); $this->button->minimumHeight = 30; $layout = new QVBoxLayout(); $layout->addWidget($this->textEdit); $layout->addWidget($this->progressBar); $layout->addWidget($this->button); $this->setLayout($layout); }
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); }
function __construct() { parent::__construct(); $this->setFixedSize(200, 120); $this->quit = new QPushButton(tr("Quit"), $this); $this->quit->setGeometry(62, 40, 75, 30); $this->quit->setFont(new QFont("Times", 18, QFont::Bold)); /* the macro qApp is not available in php-qt, we use QApplication::instance() directly. */ $this->connect($this->quit, SIGNAL('clicked()'), QApplication::instance(), SLOT('quit()')); }
/** * runs a simple model/view app for a moment */ function testModelView() { if (!QCoreApplication::instance()) { $argv = array(""); $app = new QApplication(1, $argv); } $model_a = new MyItemModel(); $treeView = new QTableView(); $treeView->setModel($model_a); $treeView->show(); QTimer::singleShot(100, QCoreApplication::instance(), SLOT("quit()")); $app->exec(); }
function testCallingSlot() { #return; // $clickedButton = qobject_cast($this->sender(), new QToolButton()); $argc = 1; $argv = array("argv"); $app = new MyApplication($argc, $argv); QTimer::singleShot(100, $app, SLOT("mySlot()")); print "OK"; QTimer::singleShot(100, $app, SLOT("quit()")); print "OK"; # $app->exec(); }
public function setupConnections() { $this->quit = new QPushButton(tr("Quit")); $this->quit->setFont(new QFont("Times", 18, QFont::Bold)); QObject::connect($this->quit, SIGNAL('clicked()'), QApplication::instance(), SLOT('quit()')); $this->angle = new LCDRange(); $this->angle->setRange(5, 70); /* $this->cannonField = new CannonField(); */ // QObject::connect($this->angle, SIGNAL('valueChanged(int)'), $this->cannonField, SLOT('setAngle(int)')); // QObject::connect($this->cannonField, SIGNAL('angleChanged(int)'), $this->angle, SLOT('setValue(int)')); }
public function __construct($events, $startIndex, $parent = 0) { parent::__construct($parent); $this->startIndex = $startIndex; /* $this->csPath = c(PQNAME)->csPath; $this->csEvents = c(PQNAME)->csEvents; $this->csName = c(PQNAME)->csName; $component = get_class($object); $events = array(); while ($component != null) { $componentPath = $this->csPath . "/$component/" . $this->csName; $eventsPath = $this->csPath . "/$component/" . $this->csEvents; $r = array(); if (file_exists($eventsPath) && is_file($eventsPath)) { require ($eventsPath); if (count($r) > 0) { $events[$component] = $r; } } $component = null; require($componentPath); if (isset($r['parent']) && !empty(trim($r['parent']))) { $component = $r['parent']; } } $list = new QListWidget($this); $list->alternatingRowColors = true; $list->connect(SIGNAL('itemDoubleClicked(int)'), $this, SLOT('itemDoubleClicked(int)')); foreach($events as $c => $e) { foreach($e as $event) { $list->addItem($event['event']); } }*/ $list = new QListWidget($this); $list->alternatingRowColors = true; $list->connect(SIGNAL('itemDoubleClicked(int)'), $this, SLOT('itemDoubleClicked(int)')); foreach ($events as $eventIndex => $event) { $list->addItem($event['event']); } }
public function __construct() { parent::__construct(); $this->currentAngle = 45; $this->currentForce = 0; $this->timerCount = 0; $this->autoShootTimer = new QTimer($this); QObject::connect($this->autoShootTimer, SIGNAL('timeout()'), $this, SLOT('moveShot()')); $this->shootAngle = 0; $this->shootForce = 0; $this->setPalette(new QPalette(new QColor(250, 250, 200))); $this->setAutoFillBackground(true); $this->barrelRect = new QRect(30, -5, 20, 10); }
public function __construct() { parent::__construct(); $this->lcd = new QLCDNumber(2); $this->lcd->setSegmentStyle(QLCDNumber::Filled); $this->slider = new QSlider(Qt::Horizontal); $this->slider->setRange(0, 99); $this->slider->setValue(0); $this->connect($this->slider, SIGNAL('valueChanged(int)'), $this->lcd, SLOT('display(int)')); $this->connect($this->slider, SIGNAL('valueChanged(int)'), $this, SIGNAL('valueChanged(int)')); $layout = new QVBoxLayout(); $layout->addWidget($this->lcd); $layout->addWidget($this->slider); $this->setLayout($layout); $this->setFocusProxy($this->slider); }
function __construct() { parent::__construct(); $this->quit = new QPushButton(tr("Quit")); $this->quit->setFont(new QFont("Times", 18, QFont::Bold)); $this->connect($this->quit, SIGNAL('clicked()'), QApplication::instance(), SLOT('quit()')); $this->grid = new QGridLayout(); for ($row = 0; $row < 4; ++$row) { for ($column = 0; $column < 4; ++$column) { $this->grid->addWidget(new LCDRange(), $row, $column); } } $this->layout = new QVBoxLayout(); $this->layout->addWidget($this->quit); $this->layout->addLayout($this->grid); $this->setLayout($this->layout); }
function __construct() { parent::__construct(); $this->quit = new QPushButton(tr("Quit")); $this->quit->setFont(new QFont("Times", 18, QFont::Bold)); $this->lcd = new QLCDNumber(2); $this->lcd->setSegmentStyle(QLCDNumber::Filled); $this->slider = new QSlider(Qt::Horizontal); $this->slider->setRange(0, 99); $this->slider->setValue(0); $this->connect($this->quit, SIGNAL('clicked()'), QApplication::instance(), SLOT('quit()')); $this->connect($this->slider, SIGNAL('valueChanged(int)'), $this->lcd, SLOT('display(int)')); $this->layout = new QVBoxLayout(); $this->layout->addWidget($this->quit); $this->layout->addWidget($this->lcd); $this->layout->addWidget($this->slider); $this->setLayout($this->layout); }
public function __construct() { parent::__construct(); $quit = new QPushButton(tr("Quit")); $quit->setFont(new QFont("Times", 18, QFont::Bold)); // QObject::connect($quit, SIGNAL('clicked()'), qApp(), SLOT('quit()')); QObject::connect($quit, SIGNAL('clicked()'), QApplication::instance(), SLOT('quit()')); $angle = new LCDRange(); $angle->setRange(5, 70); $cannonField = new CannonField(); QObject::connect($angle, SIGNAL('valueChanged(int)'), $cannonField, SLOT('setAngle(int)')); QObject::connect($cannonField, SIGNAL('angleChanged(int)'), $angle, SLOT('setValue(int)')); $gridLayout = new QGridLayout(); $gridLayout->addWidget($quit, 0, 0); $gridLayout->addWidget($angle, 1, 0); $gridLayout->addWidget($cannonField, 1, 1, 2, 1); $gridLayout->setColumnStretch(1, 10); $this->setLayout($gridLayout); $angle->setValue(60); $angle->setFocus(); }
private function create_button($text, $icon, $slot = '', $enabled = true, $align = 'left') { $widget = new QWidget($this); $button = new QPushButton($widget); $button->text = $text; $button->setMinimumSize(200, 36); $button->enabled = $enabled; $button->styleSheet = "text-align:{$align};padding-left:50px;padding-right:20px;font-size:14px;"; $label = new QLabel($widget); $label->icon = $this->iconsPath . "/{$icon}"; $label->resize(32, 32); $label->enabled = $enabled; $label->move(10, 0); if (!empty($slot)) { $button->connect(SIGNAL('clicked(bool)'), $this, $slot); $label->connect(SIGNAL('mouseClicked()'), $button, SLOT('click()')); } $layout = new QHBoxLayout(); $layout->setContentsMargins(0, 6, 0, 0); $layout->addWidget($button); $widget->setLayout($layout); return $widget; }
public function __construct() { parent::__construct(); $this->connect($this, SIGNAL('testSignal()'), $this, SLOT('testSlot()')); $this->connect($this, SIGNAL('testSignal()'), $this, SLOT('show()')); $this->connect($this, SIGNAL('testSignalSignal()'), $this, SIGNAL('clicked()')); // $this->connect( $this, SIGNAL('clicked()'), $this, SLOT('testSlot()') ); // $this->connect( $this, SIGNAL('clicked()'), $this, SLOT('toggle()') ); $this->connect($this, SIGNAL('pressed()'), $this, SIGNAL('testSignalSignal()')); $this->connect($this, SIGNAL('released()'), $this, SIGNAL('pressed()')); $this->connect($this, SIGNAL('clicked(bool)'), $this, SLOT('setChecked(bool)')); $this->slotTester = ""; }
{ private $mainWidget; public $button1; public $button2; function __construct() { $mainWidget = new QWidget(); parent::__construct(QBoxLayout::TopToBottom, $mainWidget); $this->mainWidget = $mainWidget; $this->button1 = new QPushButton("About Qt!"); $this->button2 = new QPushButton("Quit"); $this->addWidget($this->button1); $this->addWidget($this->button2); } function __destruct() { $this->button1 = 0; $this->button2 = 0; $this->mainWidget = 0; } function show() { $this->mainWidget->show(); } } $app = new QApplication($argc, $argv); $box = new Box(); $box->show(); QObject::connect($box->button1, SIGNAL("clicked()"), $app, SLOT("aboutQt()")); QObject::connect($box->button2, SIGNAL("clicked()"), $app, SLOT("quit()")); $app->exec();
private function createRootItemWidget($property, $object, $tree, $itemIndex) { $widget = null; switch ($property['type']) { case 'mixed': case 'int': $widget = new QLineEdit(); if (isset($property['value']) && !$defaultPropertiesLoaded) { $widget->text = $property['value']; } else { $widget->text = $object->{$property}['property']; } // set validator if section exists if (isset($property['validator'])) { $widget->setRegExpValidator($property['validator']); } else { // if property type is `int` and validator section not exists, // then set a default validator for integers if ($property['type'] == 'int') { $widget->setRegExpValidator('[0-9]*'); } } $widget->connect(SIGNAL('textChanged(QString)'), $this, SLOT('setObjectProperty(QString)')); break; case 'bool': $widget = new QCheckBox(); if (isset($property['value']) && !$defaultPropertiesLoaded) { $widget->checked = $property['value']; } else { $widget->checked = $object->{$property}['property']; } $widget->connect(SIGNAL('toggled(bool)'), $this, SLOT('setObjectProperty(bool)')); break; case 'combo-list': foreach ($property['list'] as $listItemProperty) { $childItemIndex = $tree->addItem($itemIndex, $listItemProperty['title']); $childItemWidget = $this->createRootItemWidget($listItemProperty, $object, $tree, $itemIndex); if ($childItemWidget != null) { $childItemWidget->__pq_property_ = $property['property']; $childItemWidget->__pq_propertyType_ = $property['type']; $childItemWidget->objectName = "__pq_property_combo_" . $property['property'] . "_" . $listItemProperty['property']; $tree->setItemWidget($childItemIndex, 1, $childItemWidget); } } break; case 'combo': $widget = new QComboBox(); if (isset($property['list']) && is_array($property['list'])) { $index = 0; foreach ($property['list'] as $list) { if (isset($list['title']) && isset($list['value'])) { $cPropertyValue = "cPropertyValue_{$index}"; $qvalue = "__pq_property_qvalue_{$index}"; $widget->addItem($list['title']); $widget->{$cPropertyValue} = $list['value']; $widget->{$qvalue} = $list['qvalue']; if (isset($property['defaultIndex'])) { $widget->currentIndex = $property['defaultIndex']; } $index++; } } } $widget->connect(SIGNAL('currentIndexChanged(int)'), $this, SLOT('setObjectProperty(int)')); break; } return $widget; }
function __construct() { parent::__construct(); $this->pendingAdditiveOperator = new QString(); $this->pendingMultiplicativeOperator = new QString(); $this->display = new QLineEdit("0"); $this->display->setReadOnly(true); $this->display->setAlignment(Qt::AlignRight); $this->display->setMaxLength(15); $this->display->installEventFilter($this); $font = $this->display->font(); $font->setPointSize($font->pointSize() + 8); $this->display->setFont($font); $digitColor = new QColor(150, 205, 205); $backspaceColor = new QColor(225, 185, 135); $memoryColor = new QColor(100, 155, 155); $operatorColor = new QColor(155, 175, 195); for ($i = 0; $i < Calculator::NumDigitButtons; ++$i) { $this->digitButtons[$i] = $this->createButton(tr($i), $digitColor, SLOT('digitClicked()')); } $this->pointButton = $this->createButton(tr("."), $digitColor, SLOT('pointClicked()')); $this->changeSignButton = $this->createButton(tr("±"), $digitColor, SLOT('changeSignClicked()')); $this->backspaceButton = $this->createButton(tr("Backspace"), $backspaceColor, SLOT('backspaceClicked()')); $this->clearButton = $this->createButton(tr("Clear"), $backspaceColor, SLOT('clear()')); $this->clearAllButton = $this->createButton(tr("Clear All"), $backspaceColor, SLOT('clearAll()')); $this->clearMemoryButton = $this->createButton(tr("MC"), $memoryColor, SLOT('clearMemory()')); $this->readMemoryButton = $this->createButton(tr("MR"), $memoryColor, SLOT('read_Memory()')); $this->setMemoryButton = $this->createButton(tr("MS"), $memoryColor, SLOT('setMemory()')); $this->addToMemoryButton = $this->createButton(tr("M+"), $memoryColor, SLOT('addToMemory()')); $this->divisionButton = $this->createButton(tr("÷"), $operatorColor, SLOT('multiplicativeOperatorClicked()')); $this->timesButton = $this->createButton(tr("×"), $operatorColor, SLOT('multiplicativeOperatorClicked()')); $this->minusButton = $this->createButton(tr("-"), $operatorColor, SLOT('additiveOperatorClicked()')); $this->plusButton = $this->createButton(tr("+"), $operatorColor, SLOT('additiveOperatorClicked()')); $this->squareRootButton = $this->createButton(tr("Sqrt"), $operatorColor, SLOT('unaryOperatorClicked()')); $this->powerButton = $this->createButton(tr("x²"), $operatorColor, SLOT('unaryOperatorClicked()')); $this->reciprocalButton = $this->createButton(tr("1/x"), $operatorColor, SLOT('unaryOperatorClicked()')); $this->equalButton = $this->createButton(tr("="), $operatorColor, SLOT('equalClicked()')); $this->mainLayout = new QGridLayout($this); $this->mainLayout->setSizeConstraint(QLayout::SetFixedSize); $this->mainLayout->addWidget($this->display, 0, 0, 1, 6); $this->mainLayout->addWidget($this->backspaceButton, 1, 0, 1, 2); $this->mainLayout->addWidget($this->clearButton, 1, 2, 1, 2); $this->mainLayout->addWidget($this->clearAllButton, 1, 4, 1, 2); $this->mainLayout->addWidget($this->clearMemoryButton, 2, 0); $this->mainLayout->addWidget($this->readMemoryButton, 3, 0); $this->mainLayout->addWidget($this->setMemoryButton, 4, 0); $this->mainLayout->addWidget($this->addToMemoryButton, 5, 0); for ($i = 1; $i < Calculator::NumDigitButtons; ++$i) { $row = ceil((8 - ($i + 1)) / 3) + 2; $column = ceil(($i - 1) % 3) + 1; $this->mainLayout->addWidget($this->digitButtons[$i], (int) $row, (int) $column); } $this->mainLayout->addWidget($this->digitButtons[0], 5, 1); $this->mainLayout->addWidget($this->pointButton, 5, 2); $this->mainLayout->addWidget($this->changeSignButton, 5, 3); $this->mainLayout->addWidget($this->divisionButton, 2, 4); $this->mainLayout->addWidget($this->timesButton, 3, 4); $this->mainLayout->addWidget($this->minusButton, 4, 4); $this->mainLayout->addWidget($this->plusButton, 5, 4); $this->mainLayout->addWidget($this->squareRootButton, 2, 5); $this->mainLayout->addWidget($this->powerButton, 3, 5); $this->mainLayout->addWidget($this->reciprocalButton, 4, 5); $this->mainLayout->addWidget($this->equalButton, 5, 5); $this->setLayout($this->mainLayout); $this->setWindowTitle(tr("Calculator")); }
public function __construct($fileName, QWidget $parent = NULL) { parent::__construct($parent); $fileInfo = new QFileInfo($fileName); $this->tabWidget = new QTabWidget(); $this->tabWidget->addTab(new GeneralTab($fileInfo), tr("General")); $this->tabWidget->addTab(new PermissionsTab($fileInfo), tr("Permissions")); $this->tabWidget->addTab(new ApplicationsTab($fileInfo), tr("Applications")); $this->buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel); $this->connect($this->buttonBox, SIGNAL("accepted()"), $this, SLOT("accept()")); $this->connect($this->buttonBox, SIGNAL("rejected()"), $this, SLOT("reject()")); $mainLayout = new QVBoxLayout(); $mainLayout->addWidget($this->tabWidget); $mainLayout->addWidget($this->buttonBox); $this->setLayout($mainLayout); $this->setWindowTitle(tr("Tab Dialog")); }
public function __construct(&$designer, $parent = 0) { if ($parent == 0) { parent::__construct(); } else { parent::__construct($parent); } $this->designer = $designer; $this->layout = new QVBoxLayout(); $this->layout->margin = 1; $this->layout->spacing = 0; $this->stack = new QStackedWidget($this); $this->stack->lineWidth = 0; $this->stack->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred, QSizePolicy::TabWidget); $this->stack->setFrameShape(QFrame::StyledPanel); $this->stack->objectName = '___pq_creator__pqtabwidget_stack_'; $this->styleSheet = '#___pq_creator__pqtabwidget_stack_ { margin-top:-2px; background:#fff; }'; $this->tabbar = new QTabBar($this); $this->tabbar->expanding = false; $this->tabbar->connect(SIGNAL('currentChanged(int)'), $this, SLOT('setActiveStackIndex(int)')); $this->setLayout($this->layout); $this->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding, QSizePolicy::TabWidget); $this->layout->addWidget($this->tabbar); $this->layout->addWidget($this->stack); }
public function createActions() { $this->minimizeAction = new QAction($this->tr("Mi&nimize"), $this); $this->connect($this->minimizeAction, SIGNAL("triggered()"), $this, SLOT("hide()")); /* $this->maximizeAction = new QAction($this->tr("Ma&ximize"), $this); QObject::connect($this->maximizeAction, SIGNAL("triggered()"), $this, SLOT("showMaximized()")); */ $this->restoreAction = new QAction($this->tr("&Restore"), $this); $this->connect($this->restoreAction, SIGNAL("triggered()"), $this, SLOT("showNormal()")); /* $this->quitAction = new QAction($this->tr("&Quit"), $this); QObject::connect($this->quitAction, SIGNAL("triggered()"), new QApplication(), SLOT("quit()")); */ }
<?php /**************************************************************** ** ** Qt tutorial 3 ** ** original: ** http://doc.trolltech.com/4.1/tutorial-t3.html ** ****************************************************************/ if (!extension_loaded('php_qt')) { dl('php_qt.' . PHP_SHLIB_SUFFIX); } $app = new QApplication($argc, $argv); $window = new QWidget(); $window->resize(200, 120); $quit = new QPushButton("Quit", $window); $quit->setFont(new QFont("Times", 18, QFont::Bold)); $quit->setGeometry(10, 40, 180, 40); QObject::connect($quit, SIGNAL('clicked()'), $app, SLOT('quit()')); $window->show(); $app->exec();
private function createButtonsLayout() { $this->newScreenshotButton = $this->createButton(tr("New Screenshot"), $this, SLOT("newScreenshot()")); $this->saveScreenshotButton = $this->createButton(tr("Save Screenshot"), $this, SLOT("saveScreenshot()")); $this->quitScreenshotButton = $this->createButton(tr("Quit"), $this, SLOT("close()")); $this->buttonsLayout = new QHBoxLayout(); $this->buttonsLayout->addStretch(); $this->buttonsLayout->addWidget($this->newScreenshotButton); $this->buttonsLayout->addWidget($this->saveScreenshotButton); $this->buttonsLayout->addWidget($this->quitScreenshotButton); }
function testShowHide() { echo "\ntesting virtual method call 'sizeHint()' in a loop: "; $m = new myWidget(); for ($i = 0; $i < 10; $i++) { QTimer::singleShot(10, $m, SLOT("show()")); usleep(20000); $m->hide(); } echo " passed"; }