/usr/share/qt5/doc/qtwebkit/qwebpage.html is in qtwebkit5-doc-html 5.1.1-1ubuntu8.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 | <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en_US" lang="en_US">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qwebpage.cpp -->
<title>QWebPage Class | QtWebKit 5.1</title>
<link rel="stylesheet" type="text/css" href="style/offline.css" />
</head>
<body>
<div class="header" id="qtdocheader">
<div class="main">
<div class="main-rounded">
<div class="navigationbar">
<ul>
<li>Qt 5.1</li>
<li>QWebPage</li>
<li id="buildversion">
Qt 5.1.1 Reference Documentation</li>
</ul>
</div>
</div>
<div class="content">
<div class="line">
<div class="content mainContent">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#public-types">Public Types</a></li>
<li class="level1"><a href="#properties">Properties</a></li>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#signals">Signals</a></li>
<li class="level1"><a href="#protected-functions">Protected Functions</a></li>
<li class="level1"><a href="#related-non-members">Related Non-Members</a></li>
<li class="level1"><a href="#macros">Macros</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
<li class="level2"><a href="#using-qwebpage-in-a-widget-less-environment">Using QWebPage in a Widget-less Environment</a></li>
</ul>
</div>
<h1 class="title">QWebPage Class</h1>
<!-- $$$QWebPage-brief -->
<p>The QWebPage class provides an object to view and edit web documents. <a href="#details">More...</a></p>
<!-- @@@QWebPage -->
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> </b><tt><span class="preprocessor">#include <QWebPage></span>
</tt></td></tr><tr><td class="memItemLeft rightAlign topAlign"> Since:</td><td class="memItemRight bottomAlign"> Qt 4.4</td></tr></table><ul>
<li><a href="qwebpage-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="public-types"></a>
<h2>Public Types</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> class </td><td class="memItemRight bottomAlign"><b><a href="qwebpage-choosemultiplefilesextensionoption.html">ChooseMultipleFilesExtensionOption</a></b></td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> class </td><td class="memItemRight bottomAlign"><b><a href="qwebpage-choosemultiplefilesextensionreturn.html">ChooseMultipleFilesExtensionReturn</a></b></td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> class </td><td class="memItemRight bottomAlign"><b><a href="qwebpage-errorpageextensionoption.html">ErrorPageExtensionOption</a></b></td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> class </td><td class="memItemRight bottomAlign"><b><a href="qwebpage-errorpageextensionreturn.html">ErrorPageExtensionReturn</a></b></td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> class </td><td class="memItemRight bottomAlign"><b><a href="qwebpage-extensionoption.html">ExtensionOption</a></b></td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> class </td><td class="memItemRight bottomAlign"><b><a href="qwebpage-extensionreturn.html">ExtensionReturn</a></b></td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> class </td><td class="memItemRight bottomAlign"><b><a href="qwebpage-viewportattributes.html">ViewportAttributes</a></b></td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#ErrorDomain-enum">ErrorDomain</a></b> { QtNetwork, Http, WebKit }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#Extension-enum">Extension</a></b> { ChooseMultipleFilesExtension, ErrorPageExtension }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#Feature-enum">Feature</a></b> { Notifications, Geolocation }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#FindFlag-enum">FindFlag</a></b> { FindBackward, FindCaseSensitively, FindWrapsAroundDocument, HighlightAllOccurrences }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> flags </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#FindFlag-enum">FindFlags</a></b></td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#LinkDelegationPolicy-enum">LinkDelegationPolicy</a></b> { DontDelegateLinks, DelegateExternalLinks, DelegateAllLinks }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#NavigationType-enum">NavigationType</a></b> { NavigationTypeLinkClicked, NavigationTypeFormSubmitted, NavigationTypeBackOrForward, NavigationTypeReload, NavigationTypeFormResubmitted, NavigationTypeOther }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#PermissionPolicy-enum">PermissionPolicy</a></b> { PermissionUnknown, PermissionGrantedByUser, PermissionDeniedByUser }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#WebAction-enum">WebAction</a></b> { NoWebAction, OpenLink, OpenLinkInNewWindow, OpenLinkInThisWindow, ..., AlignRight }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#WebWindowType-enum">WebWindowType</a></b> { WebBrowserWindow, WebModalDialog }</td></tr>
</table>
<a name="properties"></a>
<h2>Properties</h2>
<table class="propsummary">
<tr><td class="topAlign"><ul>
<li class="fn"><b><a href="qwebpage.html#contentEditable-prop">contentEditable</a></b> : bool</li>
<li class="fn"><b><a href="qwebpage.html#forwardUnsupportedContent-prop">forwardUnsupportedContent</a></b> : bool</li>
<li class="fn"><b><a href="qwebpage.html#hasSelection-prop">hasSelection</a></b> : const bool</li>
<li class="fn"><b><a href="qwebpage.html#linkDelegationPolicy-prop">linkDelegationPolicy</a></b> : LinkDelegationPolicy</li>
<li class="fn"><b><a href="qwebpage.html#modified-prop">modified</a></b> : const bool</li>
</ul></td><td class="topAlign"><ul>
<li class="fn"><b><a href="qwebpage.html#palette-prop">palette</a></b> : QPalette</li>
<li class="fn"><b><a href="qwebpage.html#preferredContentsSize-prop">preferredContentsSize</a></b> : QSize</li>
<li class="fn"><b><a href="qwebpage.html#selectedHtml-prop">selectedHtml</a></b> : const QString</li>
<li class="fn"><b><a href="qwebpage.html#selectedText-prop">selectedText</a></b> : const QString</li>
<li class="fn"><b><a href="qwebpage.html#viewportSize-prop">viewportSize</a></b> : QSize</li>
</ul>
</td></tr>
</table>
<a name="public-functions"></a>
<h2>Public Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#QWebPage">QWebPage</a></b>(QObject *<i> parent</i> = 0)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#dtor.QWebPage">~QWebPage</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QAction * </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#action">action</a></b>(WebAction<i> action</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> quint64 </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#bytesReceived">bytesReceived</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QMenu * </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#createStandardContextMenu">createStandardContextMenu</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QWebFrame * </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#currentFrame">currentFrame</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#event">event</a></b>(QEvent *<i> ev</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#extension">extension</a></b>(Extension<i> extension</i>, const ExtensionOption *<i> option</i> = 0, ExtensionReturn *<i> output</i> = 0)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#findText">findText</a></b>(const QString &<i> subString</i>, FindFlags<i> options</i> = 0)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#focusNextPrevChild">focusNextPrevChild</a></b>(bool<i> next</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#forwardUnsupportedContent-prop">forwardUnsupportedContent</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QWebFrame * </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#frameAt">frameAt</a></b>(const QPoint &<i> pos</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#hasSelection-prop">hasSelection</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QWebHistory * </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#history">history</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QVariant </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#inputMethodQuery">inputMethodQuery</a></b>(Qt::InputMethodQuery<i> property</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#contentEditable-prop">isContentEditable</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#modified-prop">isModified</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> LinkDelegationPolicy </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#linkDelegationPolicy-prop">linkDelegationPolicy</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QWebFrame * </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#mainFrame">mainFrame</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QNetworkAccessManager * </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#networkAccessManager">networkAccessManager</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QPalette </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#palette-prop">palette</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QWebPluginFactory * </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#pluginFactory">pluginFactory</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QSize </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#preferredContentsSize-prop">preferredContentsSize</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#selectedHtml-prop">selectedHtml</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#selectedText-prop">selectedText</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#setActualVisibleContentRect">setActualVisibleContentRect</a></b>(const QRect &<i> rect</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#contentEditable-prop">setContentEditable</a></b>(bool<i> editable</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#setFeaturePermission">setFeaturePermission</a></b>(QWebFrame *<i> frame</i>, Feature<i> feature</i>, PermissionPolicy<i> policy</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#forwardUnsupportedContent-prop">setForwardUnsupportedContent</a></b>(bool<i> forward</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#linkDelegationPolicy-prop">setLinkDelegationPolicy</a></b>(LinkDelegationPolicy<i> policy</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#setNetworkAccessManager">setNetworkAccessManager</a></b>(QNetworkAccessManager *<i> manager</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#palette-prop">setPalette</a></b>(const QPalette &<i> palette</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#setPluginFactory">setPluginFactory</a></b>(QWebPluginFactory *<i> factory</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#preferredContentsSize-prop">setPreferredContentsSize</a></b>(const QSize &<i> size</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#setView">setView</a></b>(QWidget *<i> view</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#viewportSize-prop">setViewportSize</a></b>(const QSize &<i> size</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QWebSettings * </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#settings">settings</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#shouldInterruptJavaScript">shouldInterruptJavaScript</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QStringList </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#supportedContentTypes">supportedContentTypes</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#supportsContentType">supportsContentType</a></b>(const QString &<i> mimeType</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#supportsExtension">supportsExtension</a></b>(Extension<i> extension</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#swallowContextMenuEvent">swallowContextMenuEvent</a></b>(QContextMenuEvent *<i> event</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> quint64 </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#totalBytes">totalBytes</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#triggerAction">triggerAction</a></b>(WebAction<i> action</i>, bool<i> checked</i> = false)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QUndoStack * </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#undoStack">undoStack</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#updatePositionDependentActions">updatePositionDependentActions</a></b>(const QPoint &<i> pos</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QWidget * </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#view">view</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> ViewportAttributes </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#viewportAttributesForSize">viewportAttributesForSize</a></b>(const QSize &<i> availableSize</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QSize </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#viewportSize-prop">viewportSize</a></b>() const</td></tr>
</table>
<a name="signals"></a>
<h2>Signals</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#applicationCacheQuotaExceeded">applicationCacheQuotaExceeded</a></b>(QWebSecurityOrigin *<i> origin</i>, quint64<i> defaultOriginQuota</i>, quint64<i> totalSpaceNeeded</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#contentsChanged">contentsChanged</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#databaseQuotaExceeded">databaseQuotaExceeded</a></b>(QWebFrame *<i> frame</i>, QString<i> databaseName</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#downloadRequested">downloadRequested</a></b>(const QNetworkRequest &<i> request</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#featurePermissionRequestCanceled">featurePermissionRequestCanceled</a></b>(QWebFrame *<i> frame</i>, QWebPage::Feature<i> feature</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#featurePermissionRequested">featurePermissionRequested</a></b>(QWebFrame *<i> frame</i>, QWebPage::Feature<i> feature</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#frameCreated">frameCreated</a></b>(QWebFrame *<i> frame</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#geometryChangeRequested">geometryChangeRequested</a></b>(const QRect &<i> geom</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#linkClicked">linkClicked</a></b>(const QUrl &<i> url</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#linkHovered">linkHovered</a></b>(const QString &<i> link</i>, const QString &<i> title</i>, const QString &<i> textContent</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#loadFinished">loadFinished</a></b>(bool<i> ok</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#loadProgress">loadProgress</a></b>(int<i> progress</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#loadStarted">loadStarted</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#menuBarVisibilityChangeRequested">menuBarVisibilityChangeRequested</a></b>(bool<i> visible</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#microFocusChanged">microFocusChanged</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#printRequested">printRequested</a></b>(QWebFrame *<i> frame</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#repaintRequested">repaintRequested</a></b>(const QRect &<i> dirtyRect</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#restoreFrameStateRequested">restoreFrameStateRequested</a></b>(QWebFrame *<i> frame</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#saveFrameStateRequested">saveFrameStateRequested</a></b>(QWebFrame *<i> frame</i>, QWebHistoryItem *<i> item</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#scrollRequested">scrollRequested</a></b>(int<i> dx</i>, int<i> dy</i>, const QRect &<i> rectToScroll</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#selectionChanged">selectionChanged</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#statusBarMessage">statusBarMessage</a></b>(const QString &<i> text</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#statusBarVisibilityChangeRequested">statusBarVisibilityChangeRequested</a></b>(bool<i> visible</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#toolBarVisibilityChangeRequested">toolBarVisibilityChangeRequested</a></b>(bool<i> visible</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#unsupportedContent">unsupportedContent</a></b>(QNetworkReply *<i> reply</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#viewportChangeRequested">viewportChangeRequested</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#windowCloseRequested">windowCloseRequested</a></b>()</td></tr>
</table>
<a name="protected-functions"></a>
<h2>Protected Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#acceptNavigationRequest">acceptNavigationRequest</a></b>(QWebFrame *<i> frame</i>, const QNetworkRequest &<i> request</i>, NavigationType<i> type</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QString </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#chooseFile">chooseFile</a></b>(QWebFrame *<i> parentFrame</i>, const QString &<i> suggestedFile</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QObject * </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#createPlugin">createPlugin</a></b>(const QString &<i> classid</i>, const QUrl &<i> url</i>, const QStringList &<i> paramNames</i>, const QStringList &<i> paramValues</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QWebPage * </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#createWindow">createWindow</a></b>(WebWindowType<i> type</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#javaScriptAlert">javaScriptAlert</a></b>(QWebFrame *<i> frame</i>, const QString &<i> msg</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#javaScriptConfirm">javaScriptConfirm</a></b>(QWebFrame *<i> frame</i>, const QString &<i> msg</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#javaScriptConsoleMessage">javaScriptConsoleMessage</a></b>(const QString &<i> message</i>, int<i> lineNumber</i>, const QString &<i> sourceID</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#javaScriptPrompt">javaScriptPrompt</a></b>(QWebFrame *<i> frame</i>, const QString &<i> msg</i>, const QString &<i> defaultValue</i>, QString *<i> result</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QString </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#userAgentForUrl">userAgentForUrl</a></b>(const QUrl &<i> url</i>) const</td></tr>
</table>
<a name="related-non-members"></a>
<h2>Related Non-Members</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#qWebKitMajorVersion">qWebKitMajorVersion</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#qWebKitMinorVersion">qWebKitMinorVersion</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#qWebKitVersion">qWebKitVersion</a></b>()</td></tr>
</table>
<a name="macros"></a>
<h2>Macros</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#QTWEBKIT_VERSION">QTWEBKIT_VERSION</a></b></td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#QTWEBKIT_VERSION_CHECK">QTWEBKIT_VERSION_CHECK</a></b></td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qwebpage.html#QTWEBKIT_VERSION_STR">QTWEBKIT_VERSION_STR</a></b></td></tr>
</table>
<a name="details"></a>
<!-- $$$QWebPage-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The QWebPage class provides an object to view and edit web documents.</p>
<p>QWebPage holds a main frame responsible for web content, settings, the history of navigated links and actions. This class can be used, together with <a href="qwebframe.html">QWebFrame</a>, to provide functionality like <a href="qwebview.html">QWebView</a> in a widget-less environment.</p>
<p>QWebPage's API is very similar to <a href="qwebview.html">QWebView</a>, as you are still provided with common functions like <a href="qwebpage.html#action">action</a>() (known as <a href="qwebview.html#pageAction">pageAction</a>() in <a href="qwebview.html">QWebView</a>), <a href="qwebpage.html#triggerAction">triggerAction</a>(), <a href="qwebpage.html#findText">findText</a>() and <a href="qwebpage.html#settings">settings</a>(). More <a href="qwebview.html">QWebView</a>-like functions can be found in the main frame of QWebPage, obtained via the <a href="qwebpage.html#mainFrame">mainFrame</a>() function. For example, the <a href="qwebframe.html#load">load</a>(), <a href="qwebframe.html#url-prop">setUrl</a>() and <a href="qwebframe.html#setHtml">setHtml</a>() functions for QWebPage can be accessed using <a href="qwebframe.html">QWebFrame</a>.</p>
<p>The <a href="qwebpage.html#loadStarted">loadStarted</a>() signal is emitted when the page begins to load.The <a href="qwebpage.html#loadProgress">loadProgress</a>() signal, on the other hand, is emitted whenever an element of the web page completes loading, such as an embedded image, a script, etc. Finally, the <a href="qwebpage.html#loadFinished">loadFinished</a>() signal is emitted when the page contents are loaded completely, independent of script execution or page rendering. Its argument, either true or false, indicates whether or not the load operation succeeded.</p>
<a name="using-qwebpage-in-a-widget-less-environment"></a>
<h3>Using QWebPage in a Widget-less Environment</h3>
<p>Before you begin painting a QWebPage object, you need to set the size of the viewport by calling <a href="qwebpage.html#viewportSize-prop">setViewportSize</a>(). Then, you invoke the main frame's render function (<a href="qwebframe.html#render">QWebFrame::render</a>()). An example of this is shown in the code snippet below.</p>
<p>Suppose we have a <tt>Thumbnail</tt> class as follows:</p>
<pre class="cpp"><span class="keyword">class</span> Thumbnailer : <span class="keyword">public</span> <span class="type">QObject</span>
{
Q_OBJECT
<span class="keyword">public</span>:
Thumbnailer(<span class="keyword">const</span> <span class="type">QUrl</span> <span class="operator">&</span>url);
Q_SIGNALS:
<span class="type">void</span> finished();
<span class="keyword">private</span> Q_SLOTS:
<span class="type">void</span> render();
<span class="keyword">private</span>:
<span class="type">QWebPage</span> page;
};</pre>
<p>The <tt>Thumbnail</tt>'s constructor takes in a <i>url</i>. We connect our QWebPage object's <a href="qwebpage.html#loadFinished">loadFinished()</a> signal to our private slot, <tt>render()</tt>.</p>
<pre class="cpp">Thumbnailer<span class="operator">::</span>Thumbnailer(<span class="keyword">const</span> <span class="type">QUrl</span> <span class="operator">&</span>url)
{
page<span class="operator">.</span>mainFrame()<span class="operator">-</span><span class="operator">></span>load(url);
connect(<span class="operator">&</span>page<span class="operator">,</span> SIGNAL(loadFinished(bool))<span class="operator">,</span>
<span class="keyword">this</span><span class="operator">,</span> SLOT(render()));
}</pre>
<p>The <tt>render()</tt> function shows how we can paint a thumbnail using a QWebPage object.</p>
<pre class="cpp"><span class="type">void</span> Thumbnailer<span class="operator">::</span>render()
{
page<span class="operator">.</span>setViewportSize(page<span class="operator">.</span>mainFrame()<span class="operator">-</span><span class="operator">></span>contentsSize());
<span class="type">QImage</span> image(page<span class="operator">.</span>viewportSize()<span class="operator">,</span> <span class="type">QImage</span><span class="operator">::</span>Format_ARGB32);
<span class="type">QPainter</span> painter(<span class="operator">&</span>image);
page<span class="operator">.</span>mainFrame()<span class="operator">-</span><span class="operator">></span>render(<span class="operator">&</span>painter);
painter<span class="operator">.</span>end();
<span class="type">QImage</span> thumbnail <span class="operator">=</span> image<span class="operator">.</span>scaled(<span class="number">400</span><span class="operator">,</span> <span class="number">400</span>);
thumbnail<span class="operator">.</span>save(<span class="string">"thumbnail.png"</span>);
<span class="keyword">emit</span> finished();
}</pre>
<p>We begin by setting the <a href="qwebpage.html#viewportSize-prop">viewportSize</a> and then we instantiate a QImage object, <tt>image</tt>, with the same size as our <a href="qwebpage.html#viewportSize-prop">viewportSize</a>. This image is then sent as a parameter to <tt>painter</tt>. Next, we render the contents of the main frame and its subframes into <tt>painter</tt>. Finally, we save the scaled image.</p>
</div>
<p><b>See also </b><a href="qwebframe.html">QWebFrame</a>.</p>
<!-- @@@QWebPage -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$ErrorDomain$$$QtNetwork$$$Http$$$WebKit -->
<h3 class="fn"><a name="ErrorDomain-enum"></a>enum QWebPage::<span class="name">ErrorDomain</span></h3>
<p>This enum describes the domain of an <a href="qwebpage-errorpageextensionoption.html">ErrorPageExtensionOption</a> object (i.e. the layer in which the error occurred).</p>
<table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><tt>QWebPage::QtNetwork</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">The error occurred in the QtNetwork layer; the error code is of type QNetworkReply::NetworkError.</td></tr>
<tr><td class="topAlign"><tt>QWebPage::Http</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">The error occurred in the HTTP layer; the error code is a HTTP status code (see QNetworkRequest::HttpStatusCodeAttribute).</td></tr>
<tr><td class="topAlign"><tt>QWebPage::WebKit</tt></td><td class="topAlign"><tt>2</tt></td><td class="topAlign">The error is an internal WebKit error.</td></tr>
</table>
<p>This enum was introduced or modified in Qt 4.6.</p>
<!-- @@@ErrorDomain -->
<!-- $$$Extension$$$ChooseMultipleFilesExtension$$$ErrorPageExtension -->
<h3 class="fn"><a name="Extension-enum"></a>enum QWebPage::<span class="name">Extension</span></h3>
<p>This enum describes the types of extensions that the page can support. Before using these extensions, you should verify that the extension is supported by calling <a href="qwebpage.html#supportsExtension">supportsExtension</a>().</p>
<table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><tt>QWebPage::ChooseMultipleFilesExtension</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">Whether the web page supports multiple file selection. This extension is invoked when the web content requests one or more file names, for example as a result of the user clicking on a "file upload" button in a HTML form where multiple file selection is allowed.</td></tr>
<tr><td class="topAlign"><tt>QWebPage::ErrorPageExtension</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">Whether the web page can provide an error page when loading fails. (introduced in Qt 4.6)</td></tr>
</table>
<p><b>See also </b><a href="qwebpage-choosemultiplefilesextensionoption.html">ChooseMultipleFilesExtensionOption</a>, <a href="qwebpage-choosemultiplefilesextensionreturn.html">ChooseMultipleFilesExtensionReturn</a>, <a href="qwebpage-errorpageextensionoption.html">ErrorPageExtensionOption</a>, and <a href="qwebpage-errorpageextensionreturn.html">ErrorPageExtensionReturn</a>.</p>
<!-- @@@Extension -->
<!-- $$$Feature$$$Notifications$$$Geolocation -->
<h3 class="fn"><a name="Feature-enum"></a>enum QWebPage::<span class="name">Feature</span></h3>
<!-- @@@Feature -->
<!-- $$$FindFlag$$$FindBackward$$$FindCaseSensitively$$$FindWrapsAroundDocument$$$HighlightAllOccurrences -->
<h3 class="flags"><a name="FindFlag-enum"></a>enum QWebPage::<span class="name">FindFlag</span><br/>flags QWebPage::<span class="name">FindFlags</span></h3>
<p>This enum describes the options available to the <a href="qwebpage.html#findText">findText</a>() function. The options can be OR-ed together from the following list:</p>
<table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><tt>QWebPage::FindBackward</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">Searches backwards instead of forwards.</td></tr>
<tr><td class="topAlign"><tt>QWebPage::FindCaseSensitively</tt></td><td class="topAlign"><tt>2</tt></td><td class="topAlign">By default <a href="qwebpage.html#findText">findText</a>() works case insensitive. Specifying this option changes the behaviour to a case sensitive find operation.</td></tr>
<tr><td class="topAlign"><tt>QWebPage::FindWrapsAroundDocument</tt></td><td class="topAlign"><tt>4</tt></td><td class="topAlign">Makes <a href="qwebpage.html#findText">findText</a>() restart from the beginning of the document if the end was reached and the text was not found.</td></tr>
<tr><td class="topAlign"><tt>QWebPage::HighlightAllOccurrences</tt></td><td class="topAlign"><tt>8</tt></td><td class="topAlign">Highlights all existing occurrences of a specific string. (This value was introduced in 4.6.)</td></tr>
</table>
<p>The FindFlags type is a typedef for <a href="">QFlags</a><FindFlag>. It stores an OR combination of FindFlag values.</p>
<!-- @@@FindFlag -->
<!-- $$$LinkDelegationPolicy$$$DontDelegateLinks$$$DelegateExternalLinks$$$DelegateAllLinks -->
<h3 class="fn"><a name="LinkDelegationPolicy-enum"></a>enum QWebPage::<span class="name">LinkDelegationPolicy</span></h3>
<p>This enum defines the delegation policies a webpage can have when activating links and emitting the <a href="qwebpage.html#linkClicked">linkClicked</a>() signal.</p>
<table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><tt>QWebPage::DontDelegateLinks</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">No links are delegated. Instead, <a href="qwebpage.html">QWebPage</a> tries to handle them all.</td></tr>
<tr><td class="topAlign"><tt>QWebPage::DelegateExternalLinks</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">When activating links that point to documents not stored on the local filesystem or an equivalent - such as the Qt resource system - then <a href="qwebpage.html#linkClicked">linkClicked</a>() is emitted.</td></tr>
<tr><td class="topAlign"><tt>QWebPage::DelegateAllLinks</tt></td><td class="topAlign"><tt>2</tt></td><td class="topAlign">Whenever a link is activated the <a href="qwebpage.html#linkClicked">linkClicked</a>() signal is emitted.</td></tr>
</table>
<p><b>See also </b><a href="qwebpage.html#linkDelegationPolicy-prop">QWebPage::linkDelegationPolicy</a>.</p>
<!-- @@@LinkDelegationPolicy -->
<!-- $$$NavigationType$$$NavigationTypeLinkClicked$$$NavigationTypeFormSubmitted$$$NavigationTypeBackOrForward$$$NavigationTypeReload$$$NavigationTypeFormResubmitted$$$NavigationTypeOther -->
<h3 class="fn"><a name="NavigationType-enum"></a>enum QWebPage::<span class="name">NavigationType</span></h3>
<p>This enum describes the types of navigation available when browsing through hyperlinked documents.</p>
<table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><tt>QWebPage::NavigationTypeLinkClicked</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">The user clicked on a link or pressed return on a focused link.</td></tr>
<tr><td class="topAlign"><tt>QWebPage::NavigationTypeFormSubmitted</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">The user activated a submit button for an HTML form.</td></tr>
<tr><td class="topAlign"><tt>QWebPage::NavigationTypeBackOrForward</tt></td><td class="topAlign"><tt>2</tt></td><td class="topAlign">Navigation to a previously shown document in the back or forward history is requested.</td></tr>
<tr><td class="topAlign"><tt>QWebPage::NavigationTypeReload</tt></td><td class="topAlign"><tt>3</tt></td><td class="topAlign">The user activated the reload action.</td></tr>
<tr><td class="topAlign"><tt>QWebPage::NavigationTypeFormResubmitted</tt></td><td class="topAlign"><tt>4</tt></td><td class="topAlign">An HTML form was submitted a second time.</td></tr>
<tr><td class="topAlign"><tt>QWebPage::NavigationTypeOther</tt></td><td class="topAlign"><tt>5</tt></td><td class="topAlign">A navigation to another document using a method not listed above.</td></tr>
</table>
<p><b>See also </b><a href="qwebpage.html#acceptNavigationRequest">acceptNavigationRequest</a>().</p>
<!-- @@@NavigationType -->
<!-- $$$PermissionPolicy$$$PermissionUnknown$$$PermissionGrantedByUser$$$PermissionDeniedByUser -->
<h3 class="fn"><a name="PermissionPolicy-enum"></a>enum QWebPage::<span class="name">PermissionPolicy</span></h3>
<!-- @@@PermissionPolicy -->
<!-- $$$WebAction$$$NoWebAction$$$OpenLink$$$OpenLinkInNewWindow$$$OpenFrameInNewWindow$$$DownloadLinkToDisk$$$CopyLinkToClipboard$$$OpenImageInNewWindow$$$DownloadImageToDisk$$$CopyImageToClipboard$$$Back$$$Forward$$$Stop$$$Reload$$$Cut$$$Copy$$$Paste$$$Undo$$$Redo$$$MoveToNextChar$$$MoveToPreviousChar$$$MoveToNextWord$$$MoveToPreviousWord$$$MoveToNextLine$$$MoveToPreviousLine$$$MoveToStartOfLine$$$MoveToEndOfLine$$$MoveToStartOfBlock$$$MoveToEndOfBlock$$$MoveToStartOfDocument$$$MoveToEndOfDocument$$$SelectNextChar$$$SelectPreviousChar$$$SelectNextWord$$$SelectPreviousWord$$$SelectNextLine$$$SelectPreviousLine$$$SelectStartOfLine$$$SelectEndOfLine$$$SelectStartOfBlock$$$SelectEndOfBlock$$$SelectStartOfDocument$$$SelectEndOfDocument$$$DeleteStartOfWord$$$DeleteEndOfWord$$$SetTextDirectionDefault$$$SetTextDirectionLeftToRight$$$SetTextDirectionRightToLeft$$$ToggleBold$$$ToggleItalic$$$ToggleUnderline$$$InspectElement$$$InsertParagraphSeparator$$$InsertLineSeparator$$$SelectAll$$$ReloadAndBypassCache$$$PasteAndMatchStyle$$$RemoveFormat$$$ToggleStrikethrough$$$ToggleSubscript$$$ToggleSuperscript$$$InsertUnorderedList$$$InsertOrderedList$$$Indent$$$Outdent$$$AlignCenter$$$AlignJustified$$$AlignLeft$$$AlignRight$$$StopScheduledPageRefresh$$$CopyImageUrlToClipboard$$$OpenLinkInThisWindow$$$WebActionCount -->
<h3 class="fn"><a name="WebAction-enum"></a>enum QWebPage::<span class="name">WebAction</span></h3>
<p>This enum describes the types of action which can be performed on the web page.</p>
<p>Actions only have an effect when they are applicable. The availability of actions can be be determined by checking isEnabled() on the action returned by <a href="qwebpage.html#action">action</a>().</p>
<p>One method of enabling the text editing, cursor movement, and text selection actions is by setting <a href="qwebpage.html#contentEditable-prop">contentEditable</a> to true.</p>
<table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><tt>QWebPage::NoWebAction</tt></td><td class="topAlign"><tt>-1</tt></td><td class="topAlign">No action is triggered.</td></tr>
<tr><td class="topAlign"><tt>QWebPage::OpenLink</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">Open the current link.</td></tr>
<tr><td class="topAlign"><tt>QWebPage::OpenLinkInNewWindow</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">Open the current link in a new window.</td></tr>
<tr><td class="topAlign"><tt>QWebPage::OpenLinkInThisWindow</tt></td><td class="topAlign"><tt>69</tt></td><td class="topAlign">Open the current link without opening a new window. Used on links that would default to opening in another frame or a new window. (Added in Qt 5.0)</td></tr>
<tr><td class="topAlign"><tt>QWebPage::OpenFrameInNewWindow</tt></td><td class="topAlign"><tt>2</tt></td><td class="topAlign">Replicate the current frame in a new window.</td></tr>
<tr><td class="topAlign"><tt>QWebPage::DownloadLinkToDisk</tt></td><td class="topAlign"><tt>3</tt></td><td class="topAlign">Download the current link to the disk.</td></tr>
<tr><td class="topAlign"><tt>QWebPage::CopyLinkToClipboard</tt></td><td class="topAlign"><tt>4</tt></td><td class="topAlign">Copy the current link to the clipboard.</td></tr>
<tr><td class="topAlign"><tt>QWebPage::OpenImageInNewWindow</tt></td><td class="topAlign"><tt>5</tt></td><td class="topAlign">Open the highlighted image in a new window.</td></tr>
<tr><td class="topAlign"><tt>QWebPage::DownloadImageToDisk</tt></td><td class="topAlign"><tt>6</tt></td><td class="topAlign">Download the highlighted image to the disk.</td></tr>
<tr><td class="topAlign"><tt>QWebPage::CopyImageToClipboard</tt></td><td class="topAlign"><tt>7</tt></td><td class="topAlign">Copy the highlighted image to the clipboard. (Added in Qt 4.8)</td></tr>
<tr><td class="topAlign"><tt>QWebPage::CopyImageUrlToClipboard</tt></td><td class="topAlign"><tt>68</tt></td><td class="topAlign">Copy the highlighted image's URL to the clipboard.</td></tr>
<tr><td class="topAlign"><tt>QWebPage::Back</tt></td><td class="topAlign"><tt>8</tt></td><td class="topAlign">Navigate back in the history of navigated links.</td></tr>
<tr><td class="topAlign"><tt>QWebPage::Forward</tt></td><td class="topAlign"><tt>9</tt></td><td class="topAlign">Navigate forward in the history of navigated links.</td></tr>
<tr><td class="topAlign"><tt>QWebPage::Stop</tt></td><td class="topAlign"><tt>10</tt></td><td class="topAlign">Stop loading the current page.</td></tr>
<tr><td class="topAlign"><tt>QWebPage::StopScheduledPageRefresh</tt></td><td class="topAlign"><tt>67</tt></td><td class="topAlign">Stop all pending page refresh/redirect requests. (Added in Qt 4.7)</td></tr>
<tr><td class="topAlign"><tt>QWebPage::Reload</tt></td><td class="topAlign"><tt>11</tt></td><td class="topAlign">Reload the current page.</td></tr>
<tr><td class="topAlign"><tt>QWebPage::ReloadAndBypassCache</tt></td><td class="topAlign"><tt>53</tt></td><td class="topAlign">Reload the current page, but do not use any local cache. (Added in Qt 4.6)</td></tr>
<tr><td class="topAlign"><tt>QWebPage::Cut</tt></td><td class="topAlign"><tt>12</tt></td><td class="topAlign">Cut the content currently selected into the clipboard.</td></tr>
<tr><td class="topAlign"><tt>QWebPage::Copy</tt></td><td class="topAlign"><tt>13</tt></td><td class="topAlign">Copy the content currently selected into the clipboard.</td></tr>
<tr><td class="topAlign"><tt>QWebPage::Paste</tt></td><td class="topAlign"><tt>14</tt></td><td class="topAlign">Paste content from the clipboard.</td></tr>
<tr><td class="topAlign"><tt>QWebPage::Undo</tt></td><td class="topAlign"><tt>15</tt></td><td class="topAlign">Undo the last editing action.</td></tr>
<tr><td class="topAlign"><tt>QWebPage::Redo</tt></td><td class="topAlign"><tt>16</tt></td><td class="topAlign">Redo the last editing action.</td></tr>
<tr><td class="topAlign"><tt>QWebPage::MoveToNextChar</tt></td><td class="topAlign"><tt>17</tt></td><td class="topAlign">Move the cursor to the next character.</td></tr>
<tr><td class="topAlign"><tt>QWebPage::MoveToPreviousChar</tt></td><td class="topAlign"><tt>18</tt></td><td class="topAlign">Move the cursor to the previous character.</td></tr>
<tr><td class="topAlign"><tt>QWebPage::MoveToNextWord</tt></td><td class="topAlign"><tt>19</tt></td><td class="topAlign">Move the cursor to the next word.</td></tr>
<tr><td class="topAlign"><tt>QWebPage::MoveToPreviousWord</tt></td><td class="topAlign"><tt>20</tt></td><td class="topAlign">Move the cursor to the previous word.</td></tr>
<tr><td class="topAlign"><tt>QWebPage::MoveToNextLine</tt></td><td class="topAlign"><tt>21</tt></td><td class="topAlign">Move the cursor to the next line.</td></tr>
<tr><td class="topAlign"><tt>QWebPage::MoveToPreviousLine</tt></td><td class="topAlign"><tt>22</tt></td><td class="topAlign">Move the cursor to the previous line.</td></tr>
<tr><td class="topAlign"><tt>QWebPage::MoveToStartOfLine</tt></td><td class="topAlign"><tt>23</tt></td><td class="topAlign">Move the cursor to the start of the line.</td></tr>
<tr><td class="topAlign"><tt>QWebPage::MoveToEndOfLine</tt></td><td class="topAlign"><tt>24</tt></td><td class="topAlign">Move the cursor to the end of the line.</td></tr>
<tr><td class="topAlign"><tt>QWebPage::MoveToStartOfBlock</tt></td><td class="topAlign"><tt>25</tt></td><td class="topAlign">Move the cursor to the start of the block.</td></tr>
<tr><td class="topAlign"><tt>QWebPage::MoveToEndOfBlock</tt></td><td class="topAlign"><tt>26</tt></td><td class="topAlign">Move the cursor to the end of the block.</td></tr>
<tr><td class="topAlign"><tt>QWebPage::MoveToStartOfDocument</tt></td><td class="topAlign"><tt>27</tt></td><td class="topAlign">Move the cursor to the start of the document.</td></tr>
<tr><td class="topAlign"><tt>QWebPage::MoveToEndOfDocument</tt></td><td class="topAlign"><tt>28</tt></td><td class="topAlign">Move the cursor to the end of the document.</td></tr>
<tr><td class="topAlign"><tt>QWebPage::SelectNextChar</tt></td><td class="topAlign"><tt>29</tt></td><td class="topAlign">Select to the next character.</td></tr>
<tr><td class="topAlign"><tt>QWebPage::SelectPreviousChar</tt></td><td class="topAlign"><tt>30</tt></td><td class="topAlign">Select to the previous character.</td></tr>
<tr><td class="topAlign"><tt>QWebPage::SelectNextWord</tt></td><td class="topAlign"><tt>31</tt></td><td class="topAlign">Select to the next word.</td></tr>
<tr><td class="topAlign"><tt>QWebPage::SelectPreviousWord</tt></td><td class="topAlign"><tt>32</tt></td><td class="topAlign">Select to the previous word.</td></tr>
<tr><td class="topAlign"><tt>QWebPage::SelectNextLine</tt></td><td class="topAlign"><tt>33</tt></td><td class="topAlign">Select to the next line.</td></tr>
<tr><td class="topAlign"><tt>QWebPage::SelectPreviousLine</tt></td><td class="topAlign"><tt>34</tt></td><td class="topAlign">Select to the previous line.</td></tr>
<tr><td class="topAlign"><tt>QWebPage::SelectStartOfLine</tt></td><td class="topAlign"><tt>35</tt></td><td class="topAlign">Select to the start of the line.</td></tr>
<tr><td class="topAlign"><tt>QWebPage::SelectEndOfLine</tt></td><td class="topAlign"><tt>36</tt></td><td class="topAlign">Select to the end of the line.</td></tr>
<tr><td class="topAlign"><tt>QWebPage::SelectStartOfBlock</tt></td><td class="topAlign"><tt>37</tt></td><td class="topAlign">Select to the start of the block.</td></tr>
<tr><td class="topAlign"><tt>QWebPage::SelectEndOfBlock</tt></td><td class="topAlign"><tt>38</tt></td><td class="topAlign">Select to the end of the block.</td></tr>
<tr><td class="topAlign"><tt>QWebPage::SelectStartOfDocument</tt></td><td class="topAlign"><tt>39</tt></td><td class="topAlign">Select to the start of the document.</td></tr>
<tr><td class="topAlign"><tt>QWebPage::SelectEndOfDocument</tt></td><td class="topAlign"><tt>40</tt></td><td class="topAlign">Select to the end of the document.</td></tr>
<tr><td class="topAlign"><tt>QWebPage::DeleteStartOfWord</tt></td><td class="topAlign"><tt>41</tt></td><td class="topAlign">Delete to the start of the word.</td></tr>
<tr><td class="topAlign"><tt>QWebPage::DeleteEndOfWord</tt></td><td class="topAlign"><tt>42</tt></td><td class="topAlign">Delete to the end of the word.</td></tr>
<tr><td class="topAlign"><tt>QWebPage::SetTextDirectionDefault</tt></td><td class="topAlign"><tt>43</tt></td><td class="topAlign">Set the text direction to the default direction.</td></tr>
<tr><td class="topAlign"><tt>QWebPage::SetTextDirectionLeftToRight</tt></td><td class="topAlign"><tt>44</tt></td><td class="topAlign">Set the text direction to left-to-right.</td></tr>
<tr><td class="topAlign"><tt>QWebPage::SetTextDirectionRightToLeft</tt></td><td class="topAlign"><tt>45</tt></td><td class="topAlign">Set the text direction to right-to-left.</td></tr>
<tr><td class="topAlign"><tt>QWebPage::ToggleBold</tt></td><td class="topAlign"><tt>46</tt></td><td class="topAlign">Toggle the formatting between bold and normal weight.</td></tr>
<tr><td class="topAlign"><tt>QWebPage::ToggleItalic</tt></td><td class="topAlign"><tt>47</tt></td><td class="topAlign">Toggle the formatting between italic and normal style.</td></tr>
<tr><td class="topAlign"><tt>QWebPage::ToggleUnderline</tt></td><td class="topAlign"><tt>48</tt></td><td class="topAlign">Toggle underlining.</td></tr>
<tr><td class="topAlign"><tt>QWebPage::InspectElement</tt></td><td class="topAlign"><tt>49</tt></td><td class="topAlign">Show the Web Inspector with the currently highlighted HTML element.</td></tr>
<tr><td class="topAlign"><tt>QWebPage::InsertParagraphSeparator</tt></td><td class="topAlign"><tt>50</tt></td><td class="topAlign">Insert a new paragraph.</td></tr>
<tr><td class="topAlign"><tt>QWebPage::InsertLineSeparator</tt></td><td class="topAlign"><tt>51</tt></td><td class="topAlign">Insert a new line.</td></tr>
<tr><td class="topAlign"><tt>QWebPage::SelectAll</tt></td><td class="topAlign"><tt>52</tt></td><td class="topAlign">Selects all content.</td></tr>
<tr><td class="topAlign"><tt>QWebPage::PasteAndMatchStyle</tt></td><td class="topAlign"><tt>54</tt></td><td class="topAlign">Paste content from the clipboard with current style. (Added in Qt 4.6)</td></tr>
<tr><td class="topAlign"><tt>QWebPage::RemoveFormat</tt></td><td class="topAlign"><tt>55</tt></td><td class="topAlign">Removes formatting and style. (Added in Qt 4.6)</td></tr>
<tr><td class="topAlign"><tt>QWebPage::ToggleStrikethrough</tt></td><td class="topAlign"><tt>56</tt></td><td class="topAlign">Toggle the formatting between strikethrough and normal style. (Added in Qt 4.6)</td></tr>
<tr><td class="topAlign"><tt>QWebPage::ToggleSubscript</tt></td><td class="topAlign"><tt>57</tt></td><td class="topAlign">Toggle the formatting between subscript and baseline. (Added in Qt 4.6)</td></tr>
<tr><td class="topAlign"><tt>QWebPage::ToggleSuperscript</tt></td><td class="topAlign"><tt>58</tt></td><td class="topAlign">Toggle the formatting between supercript and baseline. (Added in Qt 4.6)</td></tr>
<tr><td class="topAlign"><tt>QWebPage::InsertUnorderedList</tt></td><td class="topAlign"><tt>59</tt></td><td class="topAlign">Toggles the selection between an ordered list and a normal block. (Added in Qt 4.6)</td></tr>
<tr><td class="topAlign"><tt>QWebPage::InsertOrderedList</tt></td><td class="topAlign"><tt>60</tt></td><td class="topAlign">Toggles the selection between an ordered list and a normal block. (Added in Qt 4.6)</td></tr>
<tr><td class="topAlign"><tt>QWebPage::Indent</tt></td><td class="topAlign"><tt>61</tt></td><td class="topAlign">Increases the indentation of the currently selected format block by one increment. (Added in Qt 4.6)</td></tr>
<tr><td class="topAlign"><tt>QWebPage::Outdent</tt></td><td class="topAlign"><tt>62</tt></td><td class="topAlign">Decreases the indentation of the currently selected format block by one increment. (Added in Qt 4.6)</td></tr>
<tr><td class="topAlign"><tt>QWebPage::AlignCenter</tt></td><td class="topAlign"><tt>63</tt></td><td class="topAlign">Applies center alignment to content. (Added in Qt 4.6)</td></tr>
<tr><td class="topAlign"><tt>QWebPage::AlignJustified</tt></td><td class="topAlign"><tt>64</tt></td><td class="topAlign">Applies full justification to content. (Added in Qt 4.6)</td></tr>
<tr><td class="topAlign"><tt>QWebPage::AlignLeft</tt></td><td class="topAlign"><tt>65</tt></td><td class="topAlign">Applies left justification to content. (Added in Qt 4.6)</td></tr>
<tr><td class="topAlign"><tt>QWebPage::AlignRight</tt></td><td class="topAlign"><tt>66</tt></td><td class="topAlign">Applies right justification to content. (Added in Qt 4.6)</td></tr>
</table>
<!-- @@@WebAction -->
<!-- $$$WebWindowType$$$WebBrowserWindow$$$WebModalDialog -->
<h3 class="fn"><a name="WebWindowType-enum"></a>enum QWebPage::<span class="name">WebWindowType</span></h3>
<p>This enum describes the types of window that can be created by the <a href="qwebpage.html#createWindow">createWindow</a>() function.</p>
<table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><tt>QWebPage::WebBrowserWindow</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">The window is a regular web browser window.</td></tr>
<tr><td class="topAlign"><tt>QWebPage::WebModalDialog</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">The window acts as modal dialog.</td></tr>
</table>
<!-- @@@WebWindowType -->
</div>
<div class="prop">
<h2>Property Documentation</h2>
<!-- $$$contentEditable-prop$$$isContentEditable$$$setContentEditablebool -->
<h3 class="fn"><a name="contentEditable-prop"></a><span class="name">contentEditable</span> : <span class="type">bool</span></h3>
<p>This property holds whether the content in this QWebPage is editable or not.</p>
<p>If this property is enabled the contents of the page can be edited by the user through a visible cursor. If disabled (the default) only HTML elements in the web page with their <tt>contenteditable</tt> attribute set are editable.</p>
<p>This property was introduced in Qt 4.5.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><span class="name"><b>isContentEditable</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setContentEditable</b></span>(bool<i> editable</i>)</td></tr>
</table>
<p><b>See also </b><a href="qwebpage.html#modified-prop">modified</a>, <a href="qwebpage.html#contentsChanged">contentsChanged</a>(), and <a href="qwebpage.html#WebAction-enum">WebAction</a>.</p>
<!-- @@@contentEditable -->
<!-- $$$forwardUnsupportedContent-prop$$$forwardUnsupportedContent$$$setForwardUnsupportedContentbool -->
<h3 class="fn"><a name="forwardUnsupportedContent-prop"></a><span class="name">forwardUnsupportedContent</span> : <span class="type">bool</span></h3>
<p>This property holds whether QWebPage should forward unsupported content.</p>
<p>If enabled, the <a href="qwebpage.html#unsupportedContent">unsupportedContent</a>() signal is emitted with a network reply that can be used to read the content.</p>
<p>If disabled, the download of such content is aborted immediately.</p>
<p>By default unsupported content is not forwarded.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><span class="name"><b>forwardUnsupportedContent</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setForwardUnsupportedContent</b></span>(bool<i> forward</i>)</td></tr>
</table>
<!-- @@@forwardUnsupportedContent -->
<!-- $$$hasSelection-prop$$$hasSelection -->
<h3 class="fn"><a name="hasSelection-prop"></a><span class="name">hasSelection</span> : const <span class="type">bool</span></h3>
<p>This property holds whether this page contains selected content or not.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><span class="name"><b>hasSelection</b></span>() const</td></tr>
</table>
<p><b>See also </b><a href="qwebpage.html#selectionChanged">selectionChanged</a>().</p>
<!-- @@@hasSelection -->
<!-- $$$linkDelegationPolicy-prop$$$linkDelegationPolicy$$$setLinkDelegationPolicyLinkDelegationPolicy -->
<h3 class="fn"><a name="linkDelegationPolicy-prop"></a><span class="name">linkDelegationPolicy</span> : <span class="type"><a href="qwebpage.html#LinkDelegationPolicy-enum">LinkDelegationPolicy</a></span></h3>
<p>This property holds how QWebPage should delegate the handling of links through the linkClicked() signal.</p>
<p>The default is to delegate no links.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> LinkDelegationPolicy </td><td class="memItemRight bottomAlign"><span class="name"><b>linkDelegationPolicy</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setLinkDelegationPolicy</b></span>(LinkDelegationPolicy<i> policy</i>)</td></tr>
</table>
<!-- @@@linkDelegationPolicy -->
<!-- $$$modified-prop$$$isModified -->
<h3 class="fn"><a name="modified-prop"></a><span class="name">modified</span> : const <span class="type">bool</span></h3>
<p>This property holds whether the page contains unsubmitted form data, or the contents have been changed.</p>
<p>By default, this property is false.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><span class="name"><b>isModified</b></span>() const</td></tr>
</table>
<p><b>See also </b><a href="qwebpage.html#contentsChanged">contentsChanged</a>(), <a href="qwebpage.html#contentEditable-prop">contentEditable</a>, and <a href="qwebpage.html#undoStack">undoStack</a>().</p>
<!-- @@@modified -->
<!-- $$$palette-prop$$$palette$$$setPaletteconstQPalette& -->
<h3 class="fn"><a name="palette-prop"></a><span class="name">palette</span> : <span class="type">QPalette</span></h3>
<p>This property holds the page's palette.</p>
<p>The base brush of the palette is used to draw the background of the main frame.</p>
<p>By default, this property contains the application's default palette.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QPalette </td><td class="memItemRight bottomAlign"><span class="name"><b>palette</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setPalette</b></span>(const QPalette &<i> palette</i>)</td></tr>
</table>
<!-- @@@palette -->
<!-- $$$preferredContentsSize-prop$$$preferredContentsSize$$$setPreferredContentsSizeconstQSize& -->
<h3 class="fn"><a name="preferredContentsSize-prop"></a><span class="name">preferredContentsSize</span> : <span class="type">QSize</span></h3>
<p>This property holds a custom size used for laying out the page contents.</p>
<p>By default all pages are laid out using the viewport of the page as the base.</p>
<p>As pages mostly are designed for desktop usage, they often do not layout properly on small devices as the contents require a certain view width. For this reason it is common to use a different layout size and then scale the contents to fit within the actual view.</p>
<p>If this property is set to a valid size, this size is used for all layout needs instead of the size of the viewport.</p>
<p>Setting an invalid size, makes the page fall back to using the viewport size for layout.</p>
<p>This property was introduced in Qt 4.6.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QSize </td><td class="memItemRight bottomAlign"><span class="name"><b>preferredContentsSize</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setPreferredContentsSize</b></span>(const QSize &<i> size</i>) const</td></tr>
</table>
<p><b>See also </b><a href="qwebpage.html#viewportSize-prop">viewportSize</a>.</p>
<!-- @@@preferredContentsSize -->
<!-- $$$selectedHtml-prop$$$selectedHtml -->
<h3 class="fn"><a name="selectedHtml-prop"></a><span class="name">selectedHtml</span> : const <span class="type">QString</span></h3>
<p>This property holds the HTML currently selected.</p>
<p>By default, this property contains an empty string.</p>
<p>This property was introduced in Qt 4.8.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QString </td><td class="memItemRight bottomAlign"><span class="name"><b>selectedHtml</b></span>() const</td></tr>
</table>
<p><b>See also </b><a href="qwebpage.html#selectionChanged">selectionChanged</a>() and <a href="qwebpage.html#selectedText-prop">selectedText</a>().</p>
<!-- @@@selectedHtml -->
<!-- $$$selectedText-prop$$$selectedText -->
<h3 class="fn"><a name="selectedText-prop"></a><span class="name">selectedText</span> : const <span class="type">QString</span></h3>
<p>This property holds the text currently selected.</p>
<p>By default, this property contains an empty string.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QString </td><td class="memItemRight bottomAlign"><span class="name"><b>selectedText</b></span>() const</td></tr>
</table>
<p><b>See also </b><a href="qwebpage.html#selectionChanged">selectionChanged</a>() and <a href="qwebpage.html#selectedHtml-prop">selectedHtml</a>().</p>
<!-- @@@selectedText -->
<!-- $$$viewportSize-prop$$$viewportSize$$$setViewportSizeconstQSize& -->
<h3 class="fn"><a name="viewportSize-prop"></a><span class="name">viewportSize</span> : <span class="type">QSize</span></h3>
<p>This property holds the size of the viewport.</p>
<p>The size affects for example the visibility of scrollbars if the document is larger than the viewport.</p>
<p>By default, for a newly-created Web page, this property contains a size with zero width and height.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QSize </td><td class="memItemRight bottomAlign"><span class="name"><b>viewportSize</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setViewportSize</b></span>(const QSize &<i> size</i>) const</td></tr>
</table>
<p><b>See also </b><a href="qwebframe.html#render">QWebFrame::render</a>() and <a href="qwebpage.html#preferredContentsSize-prop">preferredContentsSize</a>.</p>
<!-- @@@viewportSize -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QWebPage[overload1]$$$QWebPageQObject* -->
<h3 class="fn"><a name="QWebPage"></a>QWebPage::<span class="name">QWebPage</span>(<span class="type">QObject</span> *<i> parent</i> = 0)</h3>
<p>Constructs an empty <a href="qwebpage.html">QWebPage</a> with parent <i>parent</i>.</p>
<!-- @@@QWebPage -->
<!-- $$$~QWebPage[overload1]$$$~QWebPage -->
<h3 class="fn"><a name="dtor.QWebPage"></a>QWebPage::<span class="name">~QWebPage</span>()</h3>
<p>Destroys the web page.</p>
<!-- @@@~QWebPage -->
<!-- $$$acceptNavigationRequest[overload1]$$$acceptNavigationRequestQWebFrame*constQNetworkRequest&NavigationType -->
<h3 class="fn"><a name="acceptNavigationRequest"></a><span class="type">bool</span> QWebPage::<span class="name">acceptNavigationRequest</span>(<span class="type"><a href="qwebframe.html">QWebFrame</a></span> *<i> frame</i>, const <span class="type">QNetworkRequest</span> &<i> request</i>, <span class="type"><a href="qwebpage.html#NavigationType-enum">NavigationType</a></span><i> type</i>)<tt> [virtual protected]</tt></h3>
<p>This function is called whenever <a href="qwebpage.html#ErrorDomain-enum">WebKit</a> requests to navigate <i>frame</i> to the resource specified by <i>request</i> by means of the specified navigation type <i>type</i>.</p>
<p>If <i>frame</i> is a null pointer then navigation to a new window is requested. If the request is accepted <a href="qwebpage.html#createWindow">createWindow</a>() will be called.</p>
<p>The default implementation interprets the page's <a href="qwebpage.html#linkDelegationPolicy-prop">linkDelegationPolicy</a> and emits linkClicked accordingly or returns true to let <a href="qwebpage.html">QWebPage</a> handle the navigation itself.</p>
<p><b>See also </b><a href="qwebpage.html#createWindow">createWindow</a>().</p>
<!-- @@@acceptNavigationRequest -->
<!-- $$$action[overload1]$$$actionWebAction -->
<h3 class="fn"><a name="action"></a><span class="type">QAction</span> * QWebPage::<span class="name">action</span>(<span class="type"><a href="qwebpage.html#WebAction-enum">WebAction</a></span><i> action</i>) const</h3>
<p>Returns a QAction for the specified <a href="qwebpage.html#WebAction-enum">WebAction</a> <i>action</i>.</p>
<p>The action is owned by the <a href="qwebpage.html">QWebPage</a> but you can customize the look by changing its properties.</p>
<p><a href="qwebpage.html">QWebPage</a> also takes care of implementing the action, so that upon triggering the corresponding action is performed on the page.</p>
<p><b>See also </b><a href="qwebpage.html#triggerAction">triggerAction</a>().</p>
<!-- @@@action -->
<!-- $$$applicationCacheQuotaExceeded[overload1]$$$applicationCacheQuotaExceededQWebSecurityOrigin*quint64quint64 -->
<h3 class="fn"><a name="applicationCacheQuotaExceeded"></a><span class="type">void</span> QWebPage::<span class="name">applicationCacheQuotaExceeded</span>(<span class="type"><a href="qwebsecurityorigin.html">QWebSecurityOrigin</a></span> *<i> origin</i>, <span class="type">quint64</span><i> defaultOriginQuota</i>, <span class="type">quint64</span><i> totalSpaceNeeded</i>)<tt> [signal]</tt></h3>
<p>This signal is emitted whenever the web site is asking to store data to the application cache database databaseName and the quota allocated to that web site is exceeded.</p>
<!-- @@@applicationCacheQuotaExceeded -->
<!-- $$$bytesReceived[overload1]$$$bytesReceived -->
<h3 class="fn"><a name="bytesReceived"></a><span class="type">quint64</span> QWebPage::<span class="name">bytesReceived</span>() const</h3>
<p>Returns the number of bytes that were received from the network to render the current page.</p>
<p><b>See also </b><a href="qwebpage.html#totalBytes">totalBytes</a>() and <a href="qwebpage.html#loadProgress">loadProgress</a>().</p>
<!-- @@@bytesReceived -->
<!-- $$$chooseFile[overload1]$$$chooseFileQWebFrame*constQString& -->
<h3 class="fn"><a name="chooseFile"></a><span class="type">QString</span> QWebPage::<span class="name">chooseFile</span>(<span class="type"><a href="qwebframe.html">QWebFrame</a></span> *<i> parentFrame</i>, const <span class="type">QString</span> &<i> suggestedFile</i>)<tt> [virtual protected]</tt></h3>
<p>This function is called when the web content requests a file name, for example as a result of the user clicking on a "file upload" button in a HTML form.</p>
<p>A suggested filename may be provided in <i>suggestedFile</i>. The frame originating the request is provided as <i>parentFrame</i>.</p>
<p><b>See also </b><a href="qwebpage.html#Extension-enum">ChooseMultipleFilesExtension</a>.</p>
<!-- @@@chooseFile -->
<!-- $$$contentsChanged[overload1]$$$contentsChanged -->
<h3 class="fn"><a name="contentsChanged"></a><span class="type">void</span> QWebPage::<span class="name">contentsChanged</span>()<tt> [signal]</tt></h3>
<p>This signal is emitted whenever the text in form elements changes as well as other editable content.</p>
<p>This function was introduced in Qt 4.5.</p>
<p><b>See also </b><a href="qwebpage.html#contentEditable-prop">contentEditable</a>, <a href="qwebpage.html#modified-prop">modified</a>, <a href="qwebframe.html#toHtml">QWebFrame::toHtml</a>(), and <a href="qwebframe.html#toPlainText">QWebFrame::toPlainText</a>().</p>
<!-- @@@contentsChanged -->
<!-- $$$createPlugin[overload1]$$$createPluginconstQString&constQUrl&constQStringList&constQStringList& -->
<h3 class="fn"><a name="createPlugin"></a><span class="type">QObject</span> * QWebPage::<span class="name">createPlugin</span>(const <span class="type">QString</span> &<i> classid</i>, const <span class="type">QUrl</span> &<i> url</i>, const <span class="type">QStringList</span> &<i> paramNames</i>, const <span class="type">QStringList</span> &<i> paramValues</i>)<tt> [virtual protected]</tt></h3>
<p>This function is called whenever <a href="qwebpage.html#ErrorDomain-enum">WebKit</a> encounters a HTML object element with type "application/x-qt-plugin". It is called regardless of the value of <a href="qwebsettings.html#WebAttribute-enum">QWebSettings::PluginsEnabled</a>. The <i>classid</i>, <i>url</i>, <i>paramNames</i> and <i>paramValues</i> correspond to the HTML object element attributes and child elements to configure the embeddable object.</p>
<!-- @@@createPlugin -->
<!-- $$$createStandardContextMenu[overload1]$$$createStandardContextMenu -->
<h3 class="fn"><a name="createStandardContextMenu"></a><span class="type">QMenu</span> * QWebPage::<span class="name">createStandardContextMenu</span>()</h3>
<p>This function creates the standard context menu which is shown when the user clicks on the web page with the right mouse button. It is called from the default contextMenuEvent() handler. The popup menu's ownership is transferred to the caller.</p>
<p>This function was introduced in Qt 4.5.</p>
<!-- @@@createStandardContextMenu -->
<!-- $$$createWindow[overload1]$$$createWindowWebWindowType -->
<h3 class="fn"><a name="createWindow"></a><span class="type">QWebPage</span> * QWebPage::<span class="name">createWindow</span>(<span class="type"><a href="qwebpage.html#WebWindowType-enum">WebWindowType</a></span><i> type</i>)<tt> [virtual protected]</tt></h3>
<p>This function is called whenever <a href="qwebpage.html#ErrorDomain-enum">WebKit</a> wants to create a new window of the given <i>type</i>, for example when a JavaScript program requests to open a document in a new window.</p>
<p>If the new window can be created, the new window's <a href="qwebpage.html">QWebPage</a> is returned; otherwise a null pointer is returned.</p>
<p>If the view associated with the web page is a <a href="qwebview.html">QWebView</a> object, then the default implementation forwards the request to <a href="qwebview.html">QWebView</a>'s createWindow() function; otherwise it returns a null pointer.</p>
<p>If <i>type</i> is <a href="qwebpage.html#WebWindowType-enum">WebModalDialog</a>, the application must call setWindowModality(Qt::ApplicationModal) on the new window.</p>
<p><b>Note: </b>In the cases when the window creation is being triggered by JavaScript, apart from reimplementing this method application must also set the JavaScriptCanOpenWindows attribute of <a href="qwebsettings.html">QWebSettings</a> to true in order for it to get called.</p><p><b>See also </b><a href="qwebpage.html#acceptNavigationRequest">acceptNavigationRequest</a>() and <a href="qwebview.html#createWindow">QWebView::createWindow</a>().</p>
<!-- @@@createWindow -->
<!-- $$$currentFrame[overload1]$$$currentFrame -->
<h3 class="fn"><a name="currentFrame"></a><span class="type"><a href="qwebframe.html">QWebFrame</a></span> * QWebPage::<span class="name">currentFrame</span>() const</h3>
<p>Returns the frame currently active.</p>
<p><b>See also </b><a href="qwebpage.html#mainFrame">mainFrame</a>() and <a href="qwebpage.html#frameCreated">frameCreated</a>().</p>
<!-- @@@currentFrame -->
<!-- $$$databaseQuotaExceeded[overload1]$$$databaseQuotaExceededQWebFrame*QString -->
<h3 class="fn"><a name="databaseQuotaExceeded"></a><span class="type">void</span> QWebPage::<span class="name">databaseQuotaExceeded</span>(<span class="type"><a href="qwebframe.html">QWebFrame</a></span> *<i> frame</i>, <span class="type">QString</span><i> databaseName</i>)<tt> [signal]</tt></h3>
<p>This signal is emitted whenever the web site shown in <i>frame</i> is asking to store data to the database <i>databaseName</i> and the quota allocated to that web site is exceeded.</p>
<p>This function was introduced in Qt 4.5.</p>
<p><b>See also </b><a href="qwebdatabase.html">QWebDatabase</a>.</p>
<!-- @@@databaseQuotaExceeded -->
<!-- $$$downloadRequested[overload1]$$$downloadRequestedconstQNetworkRequest& -->
<h3 class="fn"><a name="downloadRequested"></a><span class="type">void</span> QWebPage::<span class="name">downloadRequested</span>(const <span class="type">QNetworkRequest</span> &<i> request</i>)<tt> [signal]</tt></h3>
<p>This signal is emitted when the user decides to download a link. The url of the link as well as additional meta-information is contained in <i>request</i>.</p>
<p><b>See also </b><a href="qwebpage.html#unsupportedContent">unsupportedContent</a>().</p>
<!-- @@@downloadRequested -->
<!-- $$$event[overload1]$$$eventQEvent* -->
<h3 class="fn"><a name="event"></a><span class="type">bool</span> QWebPage::<span class="name">event</span>(<span class="type">QEvent</span> *<i> ev</i>)<tt> [virtual]</tt></h3>
<!-- @@@event -->
<!-- $$$extension[overload1]$$$extensionExtensionconstExtensionOption*ExtensionReturn* -->
<h3 class="fn"><a name="extension"></a><span class="type">bool</span> QWebPage::<span class="name">extension</span>(<span class="type"><a href="qwebpage.html#Extension-enum">Extension</a></span><i> extension</i>, const <span class="type"><a href="qwebpage-extensionoption.html">ExtensionOption</a></span> *<i> option</i> = 0, <span class="type"><a href="qwebpage-extensionreturn.html">ExtensionReturn</a></span> *<i> output</i> = 0)<tt> [virtual]</tt></h3>
<p>This virtual function can be reimplemented in a <a href="qwebpage.html">QWebPage</a> subclass to provide support for extensions. The <i>option</i> argument is provided as input to the extension; the output results can be stored in <i>output</i>.</p>
<p>The behavior of this function is determined by <i>extension</i>. The <i>option</i> and <i>output</i> values are typically casted to the corresponding types (for example, <a href="qwebpage-choosemultiplefilesextensionoption.html">ChooseMultipleFilesExtensionOption</a> and <a href="qwebpage-choosemultiplefilesextensionreturn.html">ChooseMultipleFilesExtensionReturn</a> for <a href="qwebpage.html#Extension-enum">ChooseMultipleFilesExtension</a>).</p>
<p>You can call <a href="qwebpage.html#supportsExtension">supportsExtension</a>() to check if an extension is supported by the page.</p>
<p>Returns true if the extension was called successfully; otherwise returns false.</p>
<p><b>See also </b><a href="qwebpage.html#supportsExtension">supportsExtension</a>() and <a href="qwebpage.html#Extension-enum">Extension</a>.</p>
<!-- @@@extension -->
<!-- $$$featurePermissionRequestCanceled[overload1]$$$featurePermissionRequestCanceledQWebFrame*QWebPage::Feature -->
<h3 class="fn"><a name="featurePermissionRequestCanceled"></a><span class="type">void</span> QWebPage::<span class="name">featurePermissionRequestCanceled</span>(<span class="type"><a href="qwebframe.html">QWebFrame</a></span> *<i> frame</i>, <span class="type"><a href="qwebpage.html#Feature-enum">QWebPage::Feature</a></span><i> feature</i>)<tt> [signal]</tt></h3>
<!-- @@@featurePermissionRequestCanceled -->
<!-- $$$featurePermissionRequested[overload1]$$$featurePermissionRequestedQWebFrame*QWebPage::Feature -->
<h3 class="fn"><a name="featurePermissionRequested"></a><span class="type">void</span> QWebPage::<span class="name">featurePermissionRequested</span>(<span class="type"><a href="qwebframe.html">QWebFrame</a></span> *<i> frame</i>, <span class="type"><a href="qwebpage.html#Feature-enum">QWebPage::Feature</a></span><i> feature</i>)<tt> [signal]</tt></h3>
<!-- @@@featurePermissionRequested -->
<!-- $$$findText[overload1]$$$findTextconstQString&FindFlags -->
<h3 class="fn"><a name="findText"></a><span class="type">bool</span> QWebPage::<span class="name">findText</span>(const <span class="type">QString</span> &<i> subString</i>, <span class="type"><a href="qwebpage.html#FindFlag-enum">FindFlags</a></span><i> options</i> = 0)</h3>
<p>Finds the specified string, <i>subString</i>, in the page, using the given <i>options</i>.</p>
<p>If the <a href="qwebpage.html#FindFlag-enum">HighlightAllOccurrences</a> flag is passed, the function will highlight all occurrences that exist in the page. All subsequent calls will extend the highlight, rather than replace it, with occurrences of the new string.</p>
<p>If the <a href="qwebpage.html#FindFlag-enum">HighlightAllOccurrences</a> flag is not passed, the function will select an occurrence and all subsequent calls will replace the current occurrence with the next one.</p>
<p>To clear the selection, just pass an empty string.</p>
<p>Returns true if <i>subString</i> was found; otherwise returns false.</p>
<!-- @@@findText -->
<!-- $$$focusNextPrevChild[overload1]$$$focusNextPrevChildbool -->
<h3 class="fn"><a name="focusNextPrevChild"></a><span class="type">bool</span> QWebPage::<span class="name">focusNextPrevChild</span>(<span class="type">bool</span><i> next</i>)</h3>
<p>Similar to QWidget::focusNextPrevChild() it focuses the next focusable web element if <i>next</i> is true; otherwise the previous element is focused.</p>
<p>Returns true if it can find a new focusable element, or false if it can't.</p>
<!-- @@@focusNextPrevChild -->
<!-- $$$frameAt[overload1]$$$frameAtconstQPoint& -->
<h3 class="fn"><a name="frameAt"></a><span class="type"><a href="qwebframe.html">QWebFrame</a></span> * QWebPage::<span class="name">frameAt</span>(const <span class="type">QPoint</span> &<i> pos</i>) const</h3>
<p>Returns the frame at the given point <i>pos</i>, or 0 if there is no frame at that position.</p>
<p>This function was introduced in Qt 4.6.</p>
<p><b>See also </b><a href="qwebpage.html#mainFrame">mainFrame</a>() and <a href="qwebpage.html#currentFrame">currentFrame</a>().</p>
<!-- @@@frameAt -->
<!-- $$$frameCreated[overload1]$$$frameCreatedQWebFrame* -->
<h3 class="fn"><a name="frameCreated"></a><span class="type">void</span> QWebPage::<span class="name">frameCreated</span>(<span class="type"><a href="qwebframe.html">QWebFrame</a></span> *<i> frame</i>)<tt> [signal]</tt></h3>
<p>This signal is emitted whenever the page creates a new <i>frame</i>.</p>
<p><b>See also </b><a href="qwebpage.html#currentFrame">currentFrame</a>().</p>
<!-- @@@frameCreated -->
<!-- $$$geometryChangeRequested[overload1]$$$geometryChangeRequestedconstQRect& -->
<h3 class="fn"><a name="geometryChangeRequested"></a><span class="type">void</span> QWebPage::<span class="name">geometryChangeRequested</span>(const <span class="type">QRect</span> &<i> geom</i>)<tt> [signal]</tt></h3>
<p>This signal is emitted whenever the document wants to change the position and size of the page to <i>geom</i>. This can happen for example through JavaScript.</p>
<!-- @@@geometryChangeRequested -->
<!-- $$$history[overload1]$$$history -->
<h3 class="fn"><a name="history"></a><span class="type"><a href="qwebhistory.html">QWebHistory</a></span> * QWebPage::<span class="name">history</span>() const</h3>
<p>Returns a pointer to the view's history of navigated web pages.</p>
<!-- @@@history -->
<!-- $$$inputMethodQuery[overload1]$$$inputMethodQueryQt::InputMethodQuery -->
<h3 class="fn"><a name="inputMethodQuery"></a><span class="type">QVariant</span> QWebPage::<span class="name">inputMethodQuery</span>(<span class="type">Qt::InputMethodQuery</span><i> property</i>) const</h3>
<p>This method is used by the input method to query a set of properties of the page to be able to support complex input method operations as support for surrounding text and reconversions.</p>
<p><i>property</i> specifies which property is queried.</p>
<p><b>See also </b>QWidget::inputMethodEvent(), QInputMethodEvent, and QInputContext.</p>
<!-- @@@inputMethodQuery -->
<!-- $$$javaScriptAlert[overload1]$$$javaScriptAlertQWebFrame*constQString& -->
<h3 class="fn"><a name="javaScriptAlert"></a><span class="type">void</span> QWebPage::<span class="name">javaScriptAlert</span>(<span class="type"><a href="qwebframe.html">QWebFrame</a></span> *<i> frame</i>, const <span class="type">QString</span> &<i> msg</i>)<tt> [virtual protected]</tt></h3>
<p>This function is called whenever a JavaScript program running inside <i>frame</i> calls the alert() function with the message <i>msg</i>.</p>
<p>The default implementation shows the message, <i>msg</i>, with QMessageBox::information.</p>
<!-- @@@javaScriptAlert -->
<!-- $$$javaScriptConfirm[overload1]$$$javaScriptConfirmQWebFrame*constQString& -->
<h3 class="fn"><a name="javaScriptConfirm"></a><span class="type">bool</span> QWebPage::<span class="name">javaScriptConfirm</span>(<span class="type"><a href="qwebframe.html">QWebFrame</a></span> *<i> frame</i>, const <span class="type">QString</span> &<i> msg</i>)<tt> [virtual protected]</tt></h3>
<p>This function is called whenever a JavaScript program running inside <i>frame</i> calls the confirm() function with the message, <i>msg</i>. Returns true if the user confirms the message; otherwise returns false.</p>
<p>The default implementation executes the query using QMessageBox::information with QMessageBox::Ok and QMessageBox::Cancel buttons.</p>
<!-- @@@javaScriptConfirm -->
<!-- $$$javaScriptConsoleMessage[overload1]$$$javaScriptConsoleMessageconstQString&intconstQString& -->
<h3 class="fn"><a name="javaScriptConsoleMessage"></a><span class="type">void</span> QWebPage::<span class="name">javaScriptConsoleMessage</span>(const <span class="type">QString</span> &<i> message</i>, <span class="type">int</span><i> lineNumber</i>, const <span class="type">QString</span> &<i> sourceID</i>)<tt> [virtual protected]</tt></h3>
<p>This function is called whenever a JavaScript program tries to print a <i>message</i> to the web browser's console.</p>
<p>For example in case of evaluation errors the source URL may be provided in <i>sourceID</i> as well as the <i>lineNumber</i>.</p>
<p>The default implementation prints nothing.</p>
<!-- @@@javaScriptConsoleMessage -->
<!-- $$$javaScriptPrompt[overload1]$$$javaScriptPromptQWebFrame*constQString&constQString&QString* -->
<h3 class="fn"><a name="javaScriptPrompt"></a><span class="type">bool</span> QWebPage::<span class="name">javaScriptPrompt</span>(<span class="type"><a href="qwebframe.html">QWebFrame</a></span> *<i> frame</i>, const <span class="type">QString</span> &<i> msg</i>, const <span class="type">QString</span> &<i> defaultValue</i>, <span class="type">QString</span> *<i> result</i>)<tt> [virtual protected]</tt></h3>
<p>This function is called whenever a JavaScript program running inside <i>frame</i> tries to prompt the user for input. The program may provide an optional message, <i>msg</i>, as well as a default value for the input in <i>defaultValue</i>.</p>
<p>If the prompt was cancelled by the user the implementation should return false; otherwise the result should be written to <i>result</i> and true should be returned. If the prompt was not cancelled by the user, the implementation should return true and the result string must not be null.</p>
<p>The default implementation uses QInputDialog::getText().</p>
<!-- @@@javaScriptPrompt -->
<!-- $$$linkClicked[overload1]$$$linkClickedconstQUrl& -->
<h3 class="fn"><a name="linkClicked"></a><span class="type">void</span> QWebPage::<span class="name">linkClicked</span>(const <span class="type">QUrl</span> &<i> url</i>)<tt> [signal]</tt></h3>
<p>This signal is emitted whenever the user clicks on a link and the page's <a href="qwebpage.html#linkDelegationPolicy-prop">linkDelegationPolicy</a> property is set to delegate the link handling for the specified <i>url</i>.</p>
<p>By default no links are delegated and are handled by <a href="qwebpage.html">QWebPage</a> instead.</p>
<p><b>Note: </b>This signal possibly won't be emitted for clicked links which use JavaScript to trigger navigation.</p><p><b>See also </b><a href="qwebpage.html#linkHovered">linkHovered</a>().</p>
<!-- @@@linkClicked -->
<!-- $$$linkHovered[overload1]$$$linkHoveredconstQString&constQString&constQString& -->
<h3 class="fn"><a name="linkHovered"></a><span class="type">void</span> QWebPage::<span class="name">linkHovered</span>(const <span class="type">QString</span> &<i> link</i>, const <span class="type">QString</span> &<i> title</i>, const <span class="type">QString</span> &<i> textContent</i>)<tt> [signal]</tt></h3>
<p>This signal is emitted when the mouse hovers over a link.</p>
<p><i>link</i> contains the link url. <i>title</i> is the link element's title, if it is specified in the markup. <i>textContent</i> provides text within the link element, e.g., text inside an HTML anchor tag.</p>
<p>When the mouse leaves the link element the signal is emitted with empty parameters.</p>
<p><b>See also </b><a href="qwebpage.html#linkClicked">linkClicked</a>().</p>
<!-- @@@linkHovered -->
<!-- $$$loadFinished[overload1]$$$loadFinishedbool -->
<h3 class="fn"><a name="loadFinished"></a><span class="type">void</span> QWebPage::<span class="name">loadFinished</span>(<span class="type">bool</span><i> ok</i>)<tt> [signal]</tt></h3>
<p>This signal is emitted when the page finishes loading content. This signal is independant of script execution or page rendering. <i>ok</i> will indicate whether the load was successful or any error occurred.</p>
<p><b>See also </b><a href="qwebpage.html#loadStarted">loadStarted</a>() and <a href="qwebpage.html#Extension-enum">ErrorPageExtension</a>.</p>
<!-- @@@loadFinished -->
<!-- $$$loadProgress[overload1]$$$loadProgressint -->
<h3 class="fn"><a name="loadProgress"></a><span class="type">void</span> QWebPage::<span class="name">loadProgress</span>(<span class="type">int</span><i> progress</i>)<tt> [signal]</tt></h3>
<p>This signal is emitted when the global progress status changes. The current value is provided by <i>progress</i> and scales from 0 to 100, which is the default range of QProgressBar. It accumulates changes from all the child frames.</p>
<p><b>See also </b><a href="qwebpage.html#bytesReceived">bytesReceived</a>().</p>
<!-- @@@loadProgress -->
<!-- $$$loadStarted[overload1]$$$loadStarted -->
<h3 class="fn"><a name="loadStarted"></a><span class="type">void</span> QWebPage::<span class="name">loadStarted</span>()<tt> [signal]</tt></h3>
<p>This signal is emitted when a page starts loading content.</p>
<p><b>See also </b><a href="qwebpage.html#loadFinished">loadFinished</a>().</p>
<!-- @@@loadStarted -->
<!-- $$$mainFrame[overload1]$$$mainFrame -->
<h3 class="fn"><a name="mainFrame"></a><span class="type"><a href="qwebframe.html">QWebFrame</a></span> * QWebPage::<span class="name">mainFrame</span>() const</h3>
<p>Returns the main frame of the page.</p>
<p>The main frame provides access to the hierarchy of sub-frames and is also needed if you want to explicitly render a web page into a given painter.</p>
<p><b>See also </b><a href="qwebpage.html#currentFrame">currentFrame</a>().</p>
<!-- @@@mainFrame -->
<!-- $$$menuBarVisibilityChangeRequested[overload1]$$$menuBarVisibilityChangeRequestedbool -->
<h3 class="fn"><a name="menuBarVisibilityChangeRequested"></a><span class="type">void</span> QWebPage::<span class="name">menuBarVisibilityChangeRequested</span>(<span class="type">bool</span><i> visible</i>)<tt> [signal]</tt></h3>
<p>This signal is emitted whenever the visibility of the menubar in a web browser window that hosts <a href="qwebpage.html">QWebPage</a> should be changed to <i>visible</i>.</p>
<!-- @@@menuBarVisibilityChangeRequested -->
<!-- $$$microFocusChanged[overload1]$$$microFocusChanged -->
<h3 class="fn"><a name="microFocusChanged"></a><span class="type">void</span> QWebPage::<span class="name">microFocusChanged</span>()<tt> [signal]</tt></h3>
<p>This signal is emitted when for example the position of the cursor in an editable form element changes. It is used to inform input methods about the new on-screen position where the user is able to enter text. This signal is usually connected to the QWidget::updateMicroFocus() slot.</p>
<!-- @@@microFocusChanged -->
<!-- $$$networkAccessManager[overload1]$$$networkAccessManager -->
<h3 class="fn"><a name="networkAccessManager"></a><span class="type">QNetworkAccessManager</span> * QWebPage::<span class="name">networkAccessManager</span>() const</h3>
<p>Returns the QNetworkAccessManager that is responsible for serving network requests for this <a href="qwebpage.html">QWebPage</a>.</p>
<p><b>See also </b><a href="qwebpage.html#setNetworkAccessManager">setNetworkAccessManager</a>().</p>
<!-- @@@networkAccessManager -->
<!-- $$$pluginFactory[overload1]$$$pluginFactory -->
<h3 class="fn"><a name="pluginFactory"></a><span class="type"><a href="qwebpluginfactory.html">QWebPluginFactory</a></span> * QWebPage::<span class="name">pluginFactory</span>() const</h3>
<p>Returns the <a href="qwebpluginfactory.html">QWebPluginFactory</a> that is responsible for creating plugins embedded into this <a href="qwebpage.html">QWebPage</a>. If no plugin factory is installed a null pointer is returned.</p>
<p><b>See also </b><a href="qwebpage.html#setPluginFactory">setPluginFactory</a>().</p>
<!-- @@@pluginFactory -->
<!-- $$$printRequested[overload1]$$$printRequestedQWebFrame* -->
<h3 class="fn"><a name="printRequested"></a><span class="type">void</span> QWebPage::<span class="name">printRequested</span>(<span class="type"><a href="qwebframe.html">QWebFrame</a></span> *<i> frame</i>)<tt> [signal]</tt></h3>
<p>This signal is emitted whenever the page requests the web browser to print <i>frame</i>, for example through the JavaScript <tt>window.print()</tt> call.</p>
<p><b>See also </b><a href="qwebframe.html#print">QWebFrame::print</a>() and QPrintPreviewDialog.</p>
<!-- @@@printRequested -->
<!-- $$$repaintRequested[overload1]$$$repaintRequestedconstQRect& -->
<h3 class="fn"><a name="repaintRequested"></a><span class="type">void</span> QWebPage::<span class="name">repaintRequested</span>(const <span class="type">QRect</span> &<i> dirtyRect</i>)<tt> [signal]</tt></h3>
<p>This signal is emitted whenever this <a href="qwebpage.html">QWebPage</a> should be updated. It's useful when rendering a <a href="qwebpage.html">QWebPage</a> without a <a href="qwebview.html">QWebView</a> or <a href="qgraphicswebview.html">QGraphicsWebView</a>. <i>dirtyRect</i> contains the area that needs to be updated. To paint the <a href="qwebpage.html">QWebPage</a> get the <a href="qwebpage.html#mainFrame">mainFrame</a>() and call the render(QPainter*, const QRegion&) method with the <i>dirtyRect</i> as the second parameter.</p>
<p><b>See also </b><a href="qwebpage.html#mainFrame">mainFrame</a>() and <a href="qwebpage.html#view">view</a>().</p>
<!-- @@@repaintRequested -->
<!-- $$$restoreFrameStateRequested[overload1]$$$restoreFrameStateRequestedQWebFrame* -->
<h3 class="fn"><a name="restoreFrameStateRequested"></a><span class="type">void</span> QWebPage::<span class="name">restoreFrameStateRequested</span>(<span class="type"><a href="qwebframe.html">QWebFrame</a></span> *<i> frame</i>)<tt> [signal]</tt></h3>
<p>This signal is emitted when the load of <i>frame</i> is finished and the application may now update its state accordingly.</p>
<p>This function was introduced in Qt 4.5.</p>
<!-- @@@restoreFrameStateRequested -->
<!-- $$$saveFrameStateRequested[overload1]$$$saveFrameStateRequestedQWebFrame*QWebHistoryItem* -->
<h3 class="fn"><a name="saveFrameStateRequested"></a><span class="type">void</span> QWebPage::<span class="name">saveFrameStateRequested</span>(<span class="type"><a href="qwebframe.html">QWebFrame</a></span> *<i> frame</i>, <span class="type"><a href="qwebhistoryitem.html">QWebHistoryItem</a></span> *<i> item</i>)<tt> [signal]</tt></h3>
<p>This signal is emitted shortly before the history of navigated pages in <i>frame</i> is changed, for example when navigating back in the history.</p>
<p>The provided <a href="qwebhistoryitem.html">QWebHistoryItem</a>, <i>item</i>, holds the history entry of the frame before the change.</p>
<p>A potential use-case for this signal is to store custom data in the <a href="qwebhistoryitem.html">QWebHistoryItem</a> associated to the frame, using <a href="qwebhistoryitem.html#setUserData">QWebHistoryItem::setUserData</a>().</p>
<p>This function was introduced in Qt 4.5.</p>
<!-- @@@saveFrameStateRequested -->
<!-- $$$scrollRequested[overload1]$$$scrollRequestedintintconstQRect& -->
<h3 class="fn"><a name="scrollRequested"></a><span class="type">void</span> QWebPage::<span class="name">scrollRequested</span>(<span class="type">int</span><i> dx</i>, <span class="type">int</span><i> dy</i>, const <span class="type">QRect</span> &<i> rectToScroll</i>)<tt> [signal]</tt></h3>
<p>This signal is emitted whenever the content given by <i>rectToScroll</i> needs to be scrolled <i>dx</i> and <i>dy</i> downwards and no view was set.</p>
<p><b>See also </b><a href="qwebpage.html#view">view</a>().</p>
<!-- @@@scrollRequested -->
<!-- $$$selectionChanged[overload1]$$$selectionChanged -->
<h3 class="fn"><a name="selectionChanged"></a><span class="type">void</span> QWebPage::<span class="name">selectionChanged</span>()<tt> [signal]</tt></h3>
<p>This signal is emitted whenever the selection changes, either interactively or programmatically (e.g. by calling <a href="qwebpage.html#triggerAction">triggerAction</a>() with a selection action).</p>
<p><b>See also </b><a href="qwebpage.html#selectedText-prop">selectedText</a>().</p>
<!-- @@@selectionChanged -->
<!-- $$$setActualVisibleContentRect[overload1]$$$setActualVisibleContentRectconstQRect& -->
<h3 class="fn"><a name="setActualVisibleContentRect"></a><span class="type">void</span> QWebPage::<span class="name">setActualVisibleContentRect</span>(const <span class="type">QRect</span> &<i> rect</i>) const</h3>
<!-- @@@setActualVisibleContentRect -->
<!-- $$$setFeaturePermission[overload1]$$$setFeaturePermissionQWebFrame*FeaturePermissionPolicy -->
<h3 class="fn"><a name="setFeaturePermission"></a><span class="type">void</span> QWebPage::<span class="name">setFeaturePermission</span>(<span class="type"><a href="qwebframe.html">QWebFrame</a></span> *<i> frame</i>, <span class="type"><a href="qwebpage.html#Feature-enum">Feature</a></span><i> feature</i>, <span class="type"><a href="qwebpage.html#PermissionPolicy-enum">PermissionPolicy</a></span><i> policy</i>)</h3>
<!-- @@@setFeaturePermission -->
<!-- $$$setNetworkAccessManager[overload1]$$$setNetworkAccessManagerQNetworkAccessManager* -->
<h3 class="fn"><a name="setNetworkAccessManager"></a><span class="type">void</span> QWebPage::<span class="name">setNetworkAccessManager</span>(<span class="type">QNetworkAccessManager</span> *<i> manager</i>)</h3>
<p>Sets the QNetworkAccessManager <i>manager</i> responsible for serving network requests for this <a href="qwebpage.html">QWebPage</a>.</p>
<p><b>Note: </b>It is currently not supported to change the network access manager after the <a href="qwebpage.html">QWebPage</a> has used it. The results of doing this are undefined.</p><p><b>See also </b><a href="qwebpage.html#networkAccessManager">networkAccessManager</a>().</p>
<!-- @@@setNetworkAccessManager -->
<!-- $$$setPluginFactory[overload1]$$$setPluginFactoryQWebPluginFactory* -->
<h3 class="fn"><a name="setPluginFactory"></a><span class="type">void</span> QWebPage::<span class="name">setPluginFactory</span>(<span class="type"><a href="qwebpluginfactory.html">QWebPluginFactory</a></span> *<i> factory</i>)</h3>
<p>Sets the <a href="qwebpluginfactory.html">QWebPluginFactory</a> <i>factory</i> responsible for creating plugins embedded into this <a href="qwebpage.html">QWebPage</a>.</p>
<p>Note: The plugin factory is only used if the <a href="qwebsettings.html#WebAttribute-enum">QWebSettings::PluginsEnabled</a> attribute is enabled.</p>
<p><b>See also </b><a href="qwebpage.html#pluginFactory">pluginFactory</a>().</p>
<!-- @@@setPluginFactory -->
<!-- $$$setView[overload1]$$$setViewQWidget* -->
<h3 class="fn"><a name="setView"></a><span class="type">void</span> QWebPage::<span class="name">setView</span>(<span class="type">QWidget</span> *<i> view</i>)</h3>
<p>Sets the <i>view</i> that is associated with the web page.</p>
<p><b>See also </b><a href="qwebpage.html#view">view</a>().</p>
<!-- @@@setView -->
<!-- $$$settings[overload1]$$$settings -->
<h3 class="fn"><a name="settings"></a><span class="type"><a href="qwebsettings.html">QWebSettings</a></span> * QWebPage::<span class="name">settings</span>() const</h3>
<p>Returns a pointer to the page's settings object.</p>
<p><b>See also </b><a href="qwebsettings.html#globalSettings">QWebSettings::globalSettings</a>().</p>
<!-- @@@settings -->
<!-- $$$shouldInterruptJavaScript[overload1]$$$shouldInterruptJavaScript -->
<h3 class="fn"><a name="shouldInterruptJavaScript"></a><span class="type">bool</span> QWebPage::<span class="name">shouldInterruptJavaScript</span>()<tt> [virtual]</tt></h3>
<p>This function is called when a JavaScript program is running for a long period of time.</p>
<p>If the user wanted to stop the JavaScript the implementation should return true; otherwise false.</p>
<p>The default implementation executes the query using QMessageBox::information with QMessageBox::Yes and QMessageBox::No buttons.</p>
<p>This function was introduced in Qt 4.6.</p>
<!-- @@@shouldInterruptJavaScript -->
<!-- $$$statusBarMessage[overload1]$$$statusBarMessageconstQString& -->
<h3 class="fn"><a name="statusBarMessage"></a><span class="type">void</span> QWebPage::<span class="name">statusBarMessage</span>(const <span class="type">QString</span> &<i> text</i>)<tt> [signal]</tt></h3>
<p>This signal is emitted when the statusbar <i>text</i> is changed by the page.</p>
<!-- @@@statusBarMessage -->
<!-- $$$statusBarVisibilityChangeRequested[overload1]$$$statusBarVisibilityChangeRequestedbool -->
<h3 class="fn"><a name="statusBarVisibilityChangeRequested"></a><span class="type">void</span> QWebPage::<span class="name">statusBarVisibilityChangeRequested</span>(<span class="type">bool</span><i> visible</i>)<tt> [signal]</tt></h3>
<p>This signal is emitted whenever the visibility of the statusbar in a web browser window that hosts <a href="qwebpage.html">QWebPage</a> should be changed to <i>visible</i>.</p>
<!-- @@@statusBarVisibilityChangeRequested -->
<!-- $$$supportedContentTypes[overload1]$$$supportedContentTypes -->
<h3 class="fn"><a name="supportedContentTypes"></a><span class="type">QStringList</span> QWebPage::<span class="name">supportedContentTypes</span>() const</h3>
<p>Returns the list of all content types supported by <a href="qwebpage.html">QWebPage</a>.</p>
<!-- @@@supportedContentTypes -->
<!-- $$$supportsContentType[overload1]$$$supportsContentTypeconstQString& -->
<h3 class="fn"><a name="supportsContentType"></a><span class="type">bool</span> QWebPage::<span class="name">supportsContentType</span>(const <span class="type">QString</span> &<i> mimeType</i>) const</h3>
<p>Returns true if <a href="qwebpage.html">QWebPage</a> can handle the given <i>mimeType</i>; otherwise, returns false.</p>
<!-- @@@supportsContentType -->
<!-- $$$supportsExtension[overload1]$$$supportsExtensionExtension -->
<h3 class="fn"><a name="supportsExtension"></a><span class="type">bool</span> QWebPage::<span class="name">supportsExtension</span>(<span class="type"><a href="qwebpage.html#Extension-enum">Extension</a></span><i> extension</i>) const<tt> [virtual]</tt></h3>
<p>This virtual function returns true if the web page supports <i>extension</i>; otherwise false is returned.</p>
<p><b>See also </b><a href="qwebpage.html#extension">extension</a>().</p>
<!-- @@@supportsExtension -->
<!-- $$$swallowContextMenuEvent[overload1]$$$swallowContextMenuEventQContextMenuEvent* -->
<h3 class="fn"><a name="swallowContextMenuEvent"></a><span class="type">bool</span> QWebPage::<span class="name">swallowContextMenuEvent</span>(<span class="type">QContextMenuEvent</span> *<i> event</i>)</h3>
<p>Filters the context menu event, <i>event</i>, through handlers for scrollbars and custom event handlers in the web page. Returns true if the event was handled; otherwise false.</p>
<p>A web page may swallow a context menu event through a custom event handler, allowing for context menus to be implemented in HTML/JavaScript. This is used by <a href="http://maps.google.com/">Google Maps</a>, for example.</p>
<!-- @@@swallowContextMenuEvent -->
<!-- $$$toolBarVisibilityChangeRequested[overload1]$$$toolBarVisibilityChangeRequestedbool -->
<h3 class="fn"><a name="toolBarVisibilityChangeRequested"></a><span class="type">void</span> QWebPage::<span class="name">toolBarVisibilityChangeRequested</span>(<span class="type">bool</span><i> visible</i>)<tt> [signal]</tt></h3>
<p>This signal is emitted whenever the visibility of the toolbar in a web browser window that hosts <a href="qwebpage.html">QWebPage</a> should be changed to <i>visible</i>.</p>
<!-- @@@toolBarVisibilityChangeRequested -->
<!-- $$$totalBytes[overload1]$$$totalBytes -->
<h3 class="fn"><a name="totalBytes"></a><span class="type">quint64</span> QWebPage::<span class="name">totalBytes</span>() const</h3>
<p>Returns the total number of bytes that were received from the network to render the current page, including extra content such as embedded images.</p>
<p><b>See also </b><a href="qwebpage.html#bytesReceived">bytesReceived</a>().</p>
<!-- @@@totalBytes -->
<!-- $$$triggerAction[overload1]$$$triggerActionWebActionbool -->
<h3 class="fn"><a name="triggerAction"></a><span class="type">void</span> QWebPage::<span class="name">triggerAction</span>(<span class="type"><a href="qwebpage.html#WebAction-enum">WebAction</a></span><i> action</i>, <span class="type">bool</span><i> checked</i> = false)<tt> [virtual]</tt></h3>
<p>This function can be called to trigger the specified <i>action</i>. It is also called by Qt <a href="qwebpage.html#ErrorDomain-enum">WebKit</a> if the user triggers the action, for example through a context menu item.</p>
<p>If <i>action</i> is a checkable action then <i>checked</i> specified whether the action is toggled or not.</p>
<p><b>See also </b><a href="qwebpage.html#action">action</a>().</p>
<!-- @@@triggerAction -->
<!-- $$$undoStack[overload1]$$$undoStack -->
<h3 class="fn"><a name="undoStack"></a><span class="type">QUndoStack</span> * QWebPage::<span class="name">undoStack</span>() const</h3>
<p>Returns a pointer to the undo stack used for editable content.</p>
<p><b>See also </b><a href="qwebpage.html#modified-prop">modified</a>.</p>
<!-- @@@undoStack -->
<!-- $$$unsupportedContent[overload1]$$$unsupportedContentQNetworkReply* -->
<h3 class="fn"><a name="unsupportedContent"></a><span class="type">void</span> QWebPage::<span class="name">unsupportedContent</span>(<span class="type">QNetworkReply</span> *<i> reply</i>)<tt> [signal]</tt></h3>
<p>This signal is emitted when <a href="qwebpage.html#ErrorDomain-enum">WebKit</a> cannot handle a link the user navigated to or a web server's response includes a "Content-Disposition" header with the 'attachment' directive. If "Content-Disposition" is present in <i>reply</i>, the web server is indicating that the client should prompt the user to save the content regardless of content-type. See RFC 2616 sections 19.5.1 for details about Content-Disposition.</p>
<p>At signal emission time the meta-data of the QNetworkReply <i>reply</i> is available.</p>
<p><b>Note: </b>The receiving slot is responsible for deleting the QNetworkReply <i>reply</i>.</p><p><b>Note: </b>This signal is only emitted if the <a href="qwebpage.html#forwardUnsupportedContent-prop">forwardUnsupportedContent</a> property is set to true.</p><p><b>See also </b><a href="qwebpage.html#downloadRequested">downloadRequested</a>().</p>
<!-- @@@unsupportedContent -->
<!-- $$$updatePositionDependentActions[overload1]$$$updatePositionDependentActionsconstQPoint& -->
<h3 class="fn"><a name="updatePositionDependentActions"></a><span class="type">void</span> QWebPage::<span class="name">updatePositionDependentActions</span>(const <span class="type">QPoint</span> &<i> pos</i>)</h3>
<p>Updates the page's actions depending on the position <i>pos</i>. For example if <i>pos</i> is over an image element the <a href="qwebpage.html#WebAction-enum">CopyImageToClipboard</a> action is enabled.</p>
<!-- @@@updatePositionDependentActions -->
<!-- $$$userAgentForUrl[overload1]$$$userAgentForUrlconstQUrl& -->
<h3 class="fn"><a name="userAgentForUrl"></a><span class="type">QString</span> QWebPage::<span class="name">userAgentForUrl</span>(const <span class="type">QUrl</span> &<i> url</i>) const<tt> [virtual protected]</tt></h3>
<p>This function is called when a user agent for HTTP requests is needed. You can reimplement this function to dynamically return different user agents for different URLs, based on the <i>url</i> parameter.</p>
<p>The default implementation returns the following value:</p>
<p>"Mozilla/5.0 (%Platform%%Security%%Subplatform%) AppleWebKit/%WebKitVersion% (KHTML, like Gecko) %AppVersion Safari/%WebKitVersion%"</p>
<p>In this string the following values are replaced at run-time:</p>
<ul>
<li>%Platform% expands to the windowing system followed by "; " if it is not Windows (e.g. "X11; ").</li>
<li>%Security% expands to "N; " if SSL is disabled.</li>
<li>%Subplatform% expands to the operating system version (e.g. "Windows NT 6.1" or "Intel Mac OS X 10.5").</li>
<li>%WebKitVersion% is the version of <a href="qwebpage.html#ErrorDomain-enum">WebKit</a> the application was compiled against.</li>
<li>%AppVersion% expands to QCoreApplication::applicationName()/QCoreApplication::applicationVersion() if they're set; otherwise defaulting to Qt and the current Qt version.</li>
</ul>
<!-- @@@userAgentForUrl -->
<!-- $$$view[overload1]$$$view -->
<h3 class="fn"><a name="view"></a><span class="type">QWidget</span> * QWebPage::<span class="name">view</span>() const</h3>
<p>Returns the view widget that is associated with the web page.</p>
<p><b>See also </b><a href="qwebpage.html#setView">setView</a>().</p>
<!-- @@@view -->
<!-- $$$viewportAttributesForSize[overload1]$$$viewportAttributesForSizeconstQSize& -->
<h3 class="fn"><a name="viewportAttributesForSize"></a><span class="type"><a href="qwebpage-viewportattributes.html">ViewportAttributes</a></span> QWebPage::<span class="name">viewportAttributesForSize</span>(const <span class="type">QSize</span> &<i> availableSize</i>) const</h3>
<p>Computes the optimal viewport configuration given the <i>availableSize</i>, when user interface components are disregarded.</p>
<p>The configuration is also dependent on the device screen size which is obtained automatically. For testing purposes the size can be overridden by setting two environment variables QTWEBKIT_DEVICE_WIDTH and QTWEBKIT_DEVICE_HEIGHT, which both needs to be set.</p>
<p>The <a href="qwebpage-viewportattributes.html">ViewportAttributes</a> includes a pixel density ratio, which will also be exposed to the web author though the -webkit-pixel-ratio media feature. This is the ratio between 1 density-independent pixel (DPI) and physical pixels.</p>
<p>A density-independent pixel is equivalent to one physical pixel on a 160 DPI screen, so on our platform assumes that as the baseline density.</p>
<p>The conversion of DIP units to screen pixels is quite simple:</p>
<p>pixels = DIPs * (density / 160).</p>
<p>Thus, on a 240 DPI screen, 1 DIPs would equal 1.5 physical pixels.</p>
<p>An invalid instance will be returned in the case an empty size is passed to the method.</p>
<p><b>Note: </b>The density is automatically obtained from the DPI of the screen where the page is being shown, but as many X11 servers are reporting wrong DPI, it is possible to override it using QX11Info::setAppDpiY().</p><!-- @@@viewportAttributesForSize -->
<!-- $$$viewportChangeRequested[overload1]$$$viewportChangeRequested -->
<h3 class="fn"><a name="viewportChangeRequested"></a><span class="type">void</span> QWebPage::<span class="name">viewportChangeRequested</span>()<tt> [signal]</tt></h3>
<p>Page authors can provide the supplied values by using the viewport meta tag. More information about this can be found at <a href="http://developer.apple.com/safari/library/documentation/appleapplications/reference/safariwebcontent/usingtheviewport/usingtheviewport.html">Safari Reference Library: Using the Viewport Meta Tag</a>.</p>
<p>This function was introduced in Qt 4.8.</p>
<p><b>See also </b><a href="qwebpage-viewportattributes.html">QWebPage::ViewportAttributes</a>, <a href="qwebpage.html#preferredContentsSize-prop">setPreferredContentsSize</a>(), and QGraphicsWebView::setScale().</p>
<!-- @@@viewportChangeRequested -->
<!-- $$$windowCloseRequested[overload1]$$$windowCloseRequested -->
<h3 class="fn"><a name="windowCloseRequested"></a><span class="type">void</span> QWebPage::<span class="name">windowCloseRequested</span>()<tt> [signal]</tt></h3>
<p>This signal is emitted whenever the page requests the web browser window to be closed, for example through the JavaScript <tt>window.close()</tt> call.</p>
<!-- @@@windowCloseRequested -->
</div>
<div class="relnonmem">
<h2>Related Non-Members</h2>
<!-- $$$qWebKitMajorVersion[overload1]$$$qWebKitMajorVersion -->
<h3 class="fn"><a name="qWebKitMajorVersion"></a><span class="type">int</span> <span class="name">qWebKitMajorVersion</span>()</h3>
<p>Returns the 'major' version number of WebKit at run-time as an integer (for example, 531). This is the version of WebKit the application was compiled against.</p>
<p>This function was introduced in Qt 4.6.</p>
<p><b>See also </b><a href="qwebpage.html#qWebKitVersion">qWebKitVersion</a>().</p>
<!-- @@@qWebKitMajorVersion -->
<!-- $$$qWebKitMinorVersion[overload1]$$$qWebKitMinorVersion -->
<h3 class="fn"><a name="qWebKitMinorVersion"></a><span class="type">int</span> <span class="name">qWebKitMinorVersion</span>()</h3>
<p>Returns the 'minor' version number of WebKit at run-time as an integer (for example, 3). This is the version of WebKit the application was compiled against.</p>
<p>This function was introduced in Qt 4.6.</p>
<p><b>See also </b><a href="qwebpage.html#qWebKitVersion">qWebKitVersion</a>().</p>
<!-- @@@qWebKitMinorVersion -->
<!-- $$$qWebKitVersion[overload1]$$$qWebKitVersion -->
<h3 class="fn"><a name="qWebKitVersion"></a><span class="type">QString</span> <span class="name">qWebKitVersion</span>()</h3>
<p>Returns the version number of WebKit at run-time as a string (for example, "531.3").</p>
<p>This version is commonly used in WebKit based browsers as part of the user agent string. Web servers and JavaScript might use it to identify the presence of certain WebKit engine features and behaviour.</p>
<p>The evolution of this version is bound to the releases of Apple's Safari browser. For a version specific to the Qt WebKit module, see <a href="qwebpage.html#QTWEBKIT_VERSION">QTWEBKIT_VERSION</a></p>
<p>This function was introduced in Qt 4.6.</p>
<p><b>See also </b><a href="qwebpage.html#userAgentForUrl">QWebPage::userAgentForUrl</a>().</p>
<!-- @@@qWebKitVersion -->
</div>
<div class="macros">
<h2>Macro Documentation</h2>
<!-- $$$QTWEBKIT_VERSION[overload1]$$$QTWEBKIT_VERSION -->
<h3 class="fn"><a name="QTWEBKIT_VERSION"></a><span class="name">QTWEBKIT_VERSION</span></h3>
<p>This macro expands a numeric value of the form 0xMMNNPP (MM = major, NN = minor, PP = patch) that specifies Qt WebKit's version number. For example, if you compile your application against Qt WebKit 2.1.2, the QTWEBKIT_VERSION macro will expand to 0x020102.</p>
<p>You can use QTWEBKIT_VERSION to use the latest Qt WebKit API where available.</p>
<p><b>See also </b>QT_VERSION.</p>
<!-- @@@QTWEBKIT_VERSION -->
<!-- $$$QTWEBKIT_VERSION_CHECK[overload1]$$$QTWEBKIT_VERSION_CHECK -->
<h3 class="fn"><a name="QTWEBKIT_VERSION_CHECK"></a><span class="name">QTWEBKIT_VERSION_CHECK</span></h3>
<p>Turns the major, minor and patch numbers of a version into an integer, 0xMMNNPP (MM = major, NN = minor, PP = patch). This can be compared with another similarly processed version id, for example in a preprocessor statement:</p>
<pre class="cpp"><span class="preprocessor">#if QTWEBKIT_VERSION >= QTWEBKIT_VERSION_CHECK(2, 1, 0)</span>
<span class="comment">// code to use API new in Qt WebKit 2.1.0</span>
<span class="preprocessor">#endif</span></pre>
<!-- @@@QTWEBKIT_VERSION_CHECK -->
<!-- $$$QTWEBKIT_VERSION_STR[overload1]$$$QTWEBKIT_VERSION_STR -->
<h3 class="fn"><a name="QTWEBKIT_VERSION_STR"></a><span class="name">QTWEBKIT_VERSION_STR</span></h3>
<p>This macro expands to a string that specifies Qt WebKit's version number (for example, "2.1.2"). This is the version against which the application is compiled.</p>
<p><b>See also </b><a href="qwebpage.html#QTWEBKIT_VERSION">QTWEBKIT_VERSION</a>.</p>
<!-- @@@QTWEBKIT_VERSION_STR -->
</div>
</div>
</div>
</div>
</div>
</div>
<div class="footer">
<p>
<acronym title="Copyright">©</acronym> 2013 Digia Plc and/or its
subsidiaries. Documentation contributions included herein are the copyrights of
their respective owners.<br> The documentation provided herein is licensed under the terms of the <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation License version 1.3</a> as published by the Free Software Foundation.<br> Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide. All other trademarks are property
of their respective owners. </p>
</div>
</body>
</html>
|