Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8489535
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T21:51:23+00:00 2026-06-10T21:51:23+00:00

How would you convert the following simple QT example in C using the QWebView

  • 0

How would you convert the following simple QT example in C using the QWebView widget to Java (QtJambi):

int main(int argc, char *argv[])
{
    QApplication app(argc, argv);
    QWebView view;
    view.load(QUrl("http://www.trolltech.com/"));
    view.show();
    return app.exec();
}

(Located at: http://doc.qt.nokia.com/qq/qq26-webplugin.html#qtwebkitbasics)

I could be mistaken but I think I recall such an example being present in the Qt-Jambi javadoc last year, but I can’t find it any more, when I go to http://qt-jambi.org/documentation it says “Apidoc of newest built (sic) is not still working”

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T21:51:24+00:00Added an answer on June 10, 2026 at 9:51 pm

    The API in Qt Jambi is very similar to the original Qt API so the samples can be translated almost directly.

    So the C++ version

    QWebView view;
    view.load(QUrl("http://www.trolltech.com/"));
    

    Is translated to the following in Java

    QWebView view = new QWebView();
    view.load(new QUrl("http://www.trolltech.com/"));
    

    The rest of the application (creating the main window, running the app) can be found in the hello world tutorial.

    I don’t have a working environment on my home mac, but this sample should work:

    import com.trolltech.qt.core.*;
    import com.trolltech.qt.gui.*;
    import com.trolltech.qt.webkit.*;
    
    public class SO12093494 extends QMainWindow {
    
       private QWebView webView;
    
       public SO12093494() { this(null); }
       public SO12093494(QWidget parent) {
          super(parent);
    
          webView = new QWebView();
          setCentralWidget(webView);
       }
    
       public void loadUrl(String url) {
          webView.load(new QUrl(url));
       }
    
       public static void main(String[] args) {
          QApplication.initialize(args);
    
          SO12093494 app = new SO12093494();
          app.loadUrl("http://www.trolltech.com");
          app.show();
    
          QApplication.exec();
       }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to convert the following string into an array/nested array and iterate
What would be the easiest way to convert the following key->value object array to
anyone knows any java utility method that would convert windows paths to DOS 8.3
I want multi-line strings in java, so I seek a simple preprocessor to convert
i've managed to do a simple encryption of a password entered using the following
I am the world's newest convert to the joys of LEFT JOIN. The following
I need to convert all of the following forms into .NET Uri object: hello.world
I'm trying to write a program that would convert celcius to fahrenheit and visa-versa.
I would like convert the below text into a nested array, something like you
How would I convert this kind of expression in VB.NET? I'm stomped! bool exists=repo.Exists<Post>(x=>x.Title==My

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.