summaryrefslogtreecommitdiffstats
path: root/PerlQt/t/c_qapp.t
blob: ee282660f0c923cd78aa2e440671eab55bfe7ad7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
BEGIN { print "1..3\n" }

use Qt;

$a=0;

# testing if the Qt::Application ctor works

eval { $a=Qt::Application(\@ARGV) };

print +$@ ? "not ok\n" : "ok 1\n";

# testing wether the global object is properly setup

eval { Qt::app()->libraryPaths() };

print +$@ ? "not ok\n" : "ok 2\n";

# one second test of the event loop

Qt::Timer::singleShot( 300, Qt::app(), SLOT "quit()" );

print Qt::app()->exec ? "not ok\n" : "ok 3\n";