Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Examples difficult to use - QtWebkit Examples in particular
Forum Updated to NodeBB v4.3 + New Features

Examples difficult to use - QtWebkit Examples in particular

Scheduled Pinned Locked Moved Solved General and Desktop
6 Posts 2 Posters 1.3k 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.
  • K Offline
    K Offline
    k0105
    wrote on last edited by k0105
    #1

    Hello,

    I'm facing issues with getting the imageanalyzer example to work. It complains

    File does not exist '../shared/shared.qrc'
    

    which is true, but I'm not sure how to fix it (I copied over the examples folder to ~/Documents, imported it in Qt Creator and tried to build, afterwards I even copied the entire qt directory which also didn't help - not sure where shared.qrc is).

    So there are two aspects here:

    a) Could someone help me to get the example to run?

    b) I think that Qt is selling itself under value here - it has amazing examples, but even regarding the normal examples and when I used Qt more regularly I always had problems to use them: Just running them from /usr/lib/x86_64-linux-gnu/qt5/examples won't work due to access constraints, copying parts over will not work because the projects rely on shared files and higher .pro files. Ultimately, I suggest to refactor the examples to be more self-contained. At least for me that would be very helpful.

    Thank you in advance.

    Best wishes,
    k0105

    PS:
    What seems to exacerbate the whole situation is that Anaconda apparently hijacked my Qt version - I can't switch from 5.6.1 to 5.9.1 or qt4 by setting QT_VERSION. Has this changed? How can I use my proper Qt outside Anaconda? Btw.: I'm on KDE Neon, 64bit on a Lenovo X1 Yoga.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by SGaist
      #2

      Hi and welcome to devnet,

      One way to build the example is to run an out of source build, place the shadow build folder where you have write access and that should simplify things.

      Did you make a virtual environment with Conda or did you just install everything in the "root" environment ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • K Offline
        K Offline
        k0105
        wrote on last edited by k0105
        #3

        Conda should be entirely separate - it has virtual environments, but they are not active and I installed qt5 outside.

        Shadow build is active when I use the copied directory, but if I try it with the original examples directory Qt Creator will complain that it cannot create examples.pro.user (Permission denied). Clear since it's in /usr/lib/x86_64-linux-gnu/qt5/examples

        Any idea how to proceed from here? Should I try to compile inside Docker or can I fix my setup (copy example properly, switch Qt version and compile)? Thanks in advance.

        PS:
        I note that the shared.qrc error apparently stems from webkit QML, which I don't care about. If there was a way to only build the widgets example that would be fine by me. If I try to run qmake inside the webkitwidgets subdirectory I get "Could not find qmake configuration file linux-g++", so I still think my setup is broken. That led me to worry about Anaconda in the first place. I'm not sure why its Qt was set globally - I only needed it for PyQt and it was never supposed to be used outside that environment. I have another box (Ubuntu, the one I'm writing from) which has the same problem.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          What do you mean by you installed Qt 5 outside ?

          Well, if you want to play with the examples, the most simple is to grab Qt's sources, so you have everything at hand.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • K Offline
            K Offline
            k0105
            wrote on last edited by
            #5

            No Anaconda environment active. I launched bash and did something like
            sudo apt install qtdeclarative5-dev qtwebkit5-examples libqt5webkit5-dev libqt5xmlpatterns5 libqt5xmlpatterns5-dev

            Thanks - I'll try the source code. I hope it contains the qtwebkit examples as well. Will report back in a few hours.

            1 Reply Last reply
            0
            • K Offline
              K Offline
              k0105
              wrote on last edited by k0105
              #6

              OK, turns out compiling Qt from sources is annoying, since I need QtWebkit, which is not included in the default compilation and the instructions I find are for compiling it on Windows only. Is there really no easier way? This is horribly tedious considering I just want to take a look at an example.

              Update:
              My systems were simply crap. I just installed an OpenSUSE VM and after an easy zypper install libqt5-qtwebkit-examples libqt5-creator libqt5-qtxmlpatterns-devel libQt5WebKitWidgets-devel Qt Creator built my stuff just fine as shadow build (I opened /usr/lib64/qt5/examples/webkitwidgets directly).

              Thank you for your help and my suggestion stands: Qt is an amazing platform and I think it could be even better for beginners if the amazing examples were refactored to be more self-contained and thus easier to use.

              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