Beispiel #1
0
 public function __construct()
 {
     parent::__construct();
     $this->button = new QPushButton(tr("quit"), $this);
     $this->connect($this->button, SIGNAL('clicked()'), QCoreApplication::instance(), SLOT('quit()'));
     $this->connect($this, SIGNAL('testSignal()'), $this, SLOT('testSlot()'));
     $this->connect($this, SIGNAL('testSignal()'), $this, SLOT('show()'));
     $this->slotTester = "";
 }
 function testInternals()
 {
     if (!QCoreApplication::instance()) {
         $argv = array("");
         $app = new QApplication(1, $argv);
     }
     $m = new MyWidget();
     __phpqt_unittest_invoke($m);
 }
Beispiel #3
0
 /**
  * test of creating an instance of QApplication if none exists
  */
 public function createQApplicationInstance()
 {
     if (!QCoreApplication::instance()) {
         $argc = 1;
         $argv = array("argv");
         $this->app = new QApplication($argc, $argv);
     } else {
         $this->app = QCoreApplication::instance();
     }
 }
 /**
  * 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();
 }
 public function __construct()
 {
     parent::__construct();
     $this->button = new QPushButton(tr("quit"), $this);
     $this->connect($this->button, SIGNAL('clicked()'), QCoreApplication::instance(), SLOT('quit()'));
 }
Beispiel #6
0
 /**
  * @slot
  */
 public function shootScreen()
 {
     if ($this->delaySpinBox->value() != 0) {
         QCoreApplication::instance()->beep();
     }
     $this->originalPixmap = QPixmap::grabWindow(QCoreApplication::instance()->desktop()->winId());
     $this->updateScreenshotLabel();
     $this->newScreenshotButton->setDisabled(false);
     if ($this->hideThisWindowCheckBox->isChecked()) {
         $this->show();
     }
 }