-
This commit is contained in:
37
rktwebview_qt/main.cpp
Normal file
37
rktwebview_qt/main.cpp
Normal file
@@ -0,0 +1,37 @@
|
||||
#include "rktwebview.h"
|
||||
|
||||
#include <QThread>
|
||||
|
||||
static int _argc;
|
||||
static char **_argv;
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
int wv1;
|
||||
int wv2;
|
||||
|
||||
_argc = argc;
|
||||
_argv = argv;
|
||||
|
||||
rkt_webview_init();
|
||||
wv1 = rkt_webview_create(0);
|
||||
rkt_webview_set_url(wv1, "https://wikipedia.org");
|
||||
|
||||
int i = 0;
|
||||
while(i < 20) {
|
||||
printf("Waiting...%d\n", i);
|
||||
rkt_webview_process_events(1000);
|
||||
|
||||
if (i == 10) {
|
||||
wv2 = rkt_webview_create(0);
|
||||
}
|
||||
|
||||
if (i == 15) {
|
||||
rkt_webview_close(wv1);
|
||||
}
|
||||
i += 1;
|
||||
}
|
||||
|
||||
rkt_webview_close(wv2);
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user