Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt WebKit
  4. [Solved] Including Demo Browser into own GUI / Demoapp
Forum Updated to NodeBB v4.3 + New Features

[Solved] Including Demo Browser into own GUI / Demoapp

Scheduled Pinned Locked Moved Qt WebKit
13 Posts 3 Posters 4.4k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • McLionM Offline
    McLionM Offline
    McLion
    wrote on last edited by
    #4

    Thank you guys.

    @guziemic
    Plain Qt (Widget in Designer) because I am currently bound to 4.6.3 on embLinux which does not feature most of the QML stuff ... too bad.

    @leon.anavi
    Your're probably right, for the final product for which I will do it this way to be able to design all the features like I want to have.
    However, I need to have demo version right now (like in immediately) which simply has to show that browsing to some predefined bookmarks is possible.
    Since I am unexperienced in Qt I feel like the fastest way is to simply include the finished browser.

    1 Reply Last reply
    0
    • L Offline
      L Offline
      leon.anavi
      wrote on last edited by
      #5

      [quote author="McLion" date="1349765748"]Since I am unexperienced in Qt I feel like the fastest way is to simply include the finished browser.
      [/quote]

      OK, check the documentation "QDesktopServices":http://qt-project.org/doc/qt-4.8/QDesktopServices.html You can open an external browser using "openUrl":http://qt-project.org/doc/qt-4.8/qdesktopservices.html#openUrl

      http://anavi.org/

      1 Reply Last reply
      0
      • McLionM Offline
        McLionM Offline
        McLion
        wrote on last edited by
        #6

        There is no external browser. I am developing for an embedded device (STB chip). So, I need to include it in Qt. There is a driver base which links Qt via DFB to the native HW graphic layer. There is no way to run standard apps.

        1 Reply Last reply
        0
        • G Offline
          G Offline
          guziemic
          wrote on last edited by
          #7

          If you do not want to include QWebView you could also with use of "QProcess":http://doc.qt.digia.com/qt/qprocess.html#start start another application (Browser).

          1 Reply Last reply
          0
          • McLionM Offline
            McLionM Offline
            McLion
            wrote on last edited by
            #8

            Can I keep track of the started Browser (do I get its PID for instance) and also terminate it from my GUI. This way I could maybe start the compiled Qt Demo browser as external browser, but I need to be able to have it killed from my overlay GUI.

            1 Reply Last reply
            0
            • G Offline
              G Offline
              guziemic
              wrote on last edited by
              #9

              Yes, you can have information about PID.

              For instance you you start process as "detached process":http://doc.qt.digia.com/qt/qprocess.html#startDetached then you will have it from method arguments.

              But in case of some problems in GUI, stand alone process will remain.

              In case of just simple start all processes are connected and exception in one -> causes killing whole application. But to have PID - probably you can use "QProcess:pid()":http://doc.qt.digia.com/qt/qprocess.html#pid

              Actually I was using approach with startDetached to run several application from my main GUI application.

              1 Reply Last reply
              0
              • McLionM Offline
                McLionM Offline
                McLion
                wrote on last edited by
                #10

                Thanks

                I'll try the detached process because QProcess:pid() will probably return the GUI's pid and not the one of the started browser so I will still lack a way to terminate it.

                1 Reply Last reply
                0
                • G Offline
                  G Offline
                  guziemic
                  wrote on last edited by
                  #11

                  Then to kill process you can call something like this

                  @
                  QProcess killer;
                  QString command = QString("kill %1").arg(pid);
                  killer.start(command);
                  killer.waitForFinished();
                  @

                  Anyway, if your problem is solved please add [solved] to post topic.

                  1 Reply Last reply
                  0
                  • McLionM Offline
                    McLionM Offline
                    McLion
                    wrote on last edited by
                    #12

                    OK .. testing

                    Could somebody tell me what is wrong with:
                    @process.startDetached("browser","-qws -display directfb --dfb:mode=1280x800","/opt/bin/", browserPID);@
                    Compiler tells me: no matching function for call to 'QProcess::startDetached(const char [8], const char [43], const char [10], Q_PID&)'

                    1 Reply Last reply
                    0
                    • McLionM Offline
                      McLionM Offline
                      McLion
                      wrote on last edited by
                      #13

                      Found a solution:

                      Starting with:
                      @process.start("/opt/bin/browser -qws -display directfb --dfb:mode=1280x800");@

                      Terminating with:
                      @process.terminate();@

                      1 Reply Last reply
                      0

                      • Login

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups
                      • Search
                      • Get Qt Extensions
                      • Unsolved