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. Qt5 Charts and Ubuntu 16.04

Qt5 Charts and Ubuntu 16.04

Scheduled Pinned Locked Moved Solved General and Desktop
12 Posts 3 Posters 5.5k 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.
  • B Offline
    B Offline
    Bits-n-Flips
    wrote on last edited by
    #1

    Hello all,

    So I've run into an issue here that can't seem to be resolved. I installed Qt5 v. 5.11.2, everything is installed but for some reason QtCreator is barking at me saying "found not working imports: [file location] module "QtCharts" is not installed.

    I went into the .pro file updated QT+= charts

    but this also is happening in PyQt5 as well. "module "QtCharts" is not installed"

    What gives? Is something broken in Qt5 with Ubuntu 16.04? I can't seem to find it anywhere or install it. I can't upgrade the OS or compile from scratch either because of certain project requirements I have to meet. This is super frustrating. Any help or direction would be greatly appreciated. I have come to a complete dead halt in my software production.

    1 Reply Last reply
    0
    • VRoninV Offline
      VRoninV Offline
      VRonin
      wrote on last edited by
      #2

      QtChart is an optional module, start the maintenance tool and make sure the module is ticked

      "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
      ~Napoleon Bonaparte

      On a crusade to banish setIndexWidget() from the holy land of Qt

      B 1 Reply Last reply
      1
      • VRoninV VRonin

        QtChart is an optional module, start the maintenance tool and make sure the module is ticked

        B Offline
        B Offline
        Bits-n-Flips
        wrote on last edited by
        #3

        @VRonin
        Sure is ticked.
        I've even unticked it and reticked it.

        Yup. Tried this many times. In fact during my installation process it was infact already checked. I reopened the maintenance tool, unchecked it, ran it. Closed, rebooted, and rechecked it. Nothing.

        Even PyQt5 is complaining it doesn't exist.
        I have to wait 600 seconds before replying, my apologies if I can't reply right away...

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

          Hi,

          How did you install PyQt5 ?

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

          B 1 Reply Last reply
          0
          • SGaistS SGaist

            Hi,

            How did you install PyQt5 ?

            B Offline
            B Offline
            Bits-n-Flips
            wrote on last edited by Bits-n-Flips
            #5

            @SGaist
            via terminal.
            sudo apt-get install python3-pyqt5 pyqt5-dev-tools

            PyQt5 works fine otherwise. It's just the charts and data visualizations that are not working. The same goes for QtCreator and Qt5.

            It seems that although it is technically installed, QtCreator cannot see it and nor can PyQt5. I just did a search for 'charts' in / to see if I can find where these libraries are installed and it returned a lot.
            So I have /home/user/Qt/5.11.2/gcc_64/lib/cmake/Qt5Charts
            among other directories. So it's there. It exists.

            I also have a folder called chartsqml2
            /home/user/Qt/5.11.2/Src/qtcharts/src/chartsqml2

            I'm starting to think there's an issue with Qt5 and the Ubuntu 16.04 environment. Possible bug?
            I can't upgrade to 17.10 or 18.04. The requirement states I have to use 16.04.

            Ugh - I need more reputation points, or replying in this thread is going to be torture. I have to wait 10 minutes before I can even reply to anyone.

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

              So your PyQt5 version is using your distribution's Qt. That's why it can't find the QtChar module.

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

              B 1 Reply Last reply
              1
              • SGaistS SGaist

                So your PyQt5 version is using your distribution's Qt. That's why it can't find the QtChar module.

                B Offline
                B Offline
                Bits-n-Flips
                wrote on last edited by Bits-n-Flips
                #7

                @SGaist

                Well, regardless if I am using PyQt5 or even QtCreator. I downloaded QtCreator directly from the Qt5 website. So it's 5.11.2.
                Even in QtCreator, I go to compile using qmake and there's an instant segmentation fault if I so much as use a qtchart in any way. It's installed using the Qt Maintenance Tool too. It does not even give me a reason, just exists unexpectedly. I am using QtCharts 2.2
                Using the gcc 64-bit compiler as well.

                ChartView {
                ...
                }
                
                1 Reply Last reply
                0
                • SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  Might be a silly question, did try to run the application using the debugger ?

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

                  B 1 Reply Last reply
                  0
                  • SGaistS SGaist

                    Might be a silly question, did try to run the application using the debugger ?

                    B Offline
                    B Offline
                    Bits-n-Flips
                    wrote on last edited by Bits-n-Flips
                    #9

                    @SGaist
                    Yup.
                    Debugger starts and then instantly segfaults with a SIGSEGV (segfault). No line of code, no function. Goes right into low level assembly.

                    0x7fffcbae5665  <+0x0055>        4c 8b 00              mov    (%rax),%r8
                    

                    barfs right there.

                    I'm now trying on a completely different computer, also running Ubuntu 16.04 with QtCreator and Qt5.11.2
                    I just re-ran the exact same test and it reproduced the same, exact issue. I'm starting to think that this is a bug with 16.04 and Qt5.11.2.

                    Would anyone be willing to re-test using a VM with Ubuntu 16.04 (I'm using Ubuntu Mate specifically). With 5.11.2? If this is a reproducible issue, then we can file this?

                    I just did this test with both a VM and a native install of Ubuntu Mate 16.04. Both had identical issues.

                    B 1 Reply Last reply
                    0
                    • B Bits-n-Flips

                      @SGaist
                      Yup.
                      Debugger starts and then instantly segfaults with a SIGSEGV (segfault). No line of code, no function. Goes right into low level assembly.

                      0x7fffcbae5665  <+0x0055>        4c 8b 00              mov    (%rax),%r8
                      

                      barfs right there.

                      I'm now trying on a completely different computer, also running Ubuntu 16.04 with QtCreator and Qt5.11.2
                      I just re-ran the exact same test and it reproduced the same, exact issue. I'm starting to think that this is a bug with 16.04 and Qt5.11.2.

                      Would anyone be willing to re-test using a VM with Ubuntu 16.04 (I'm using Ubuntu Mate specifically). With 5.11.2? If this is a reproducible issue, then we can file this?

                      I just did this test with both a VM and a native install of Ubuntu Mate 16.04. Both had identical issues.

                      B Offline
                      B Offline
                      Bits-n-Flips
                      wrote on last edited by
                      #10

                      @Bits-n-Flips said in Qt5 Charts and Ubuntu 16.04:

                      @SGaist
                      Yup.
                      Debugger starts and then instantly segfaults with a SIGSEGV (segfault). No line of code, no function. Goes right into low level assembly.

                      0x7fffcbae5665  <+0x0055>        4c 8b 00              mov    (%rax),%r8
                      

                      barfs right there.

                      I'm now trying on a completely different computer, also running Ubuntu 16.04 with QtCreator and Qt5.11.2
                      I just re-ran the exact same test and it reproduced the same, exact issue. I'm starting to think that this is a bug with 16.04 and Qt5.11.2.

                      Would anyone be willing to re-test using a VM with Ubuntu 16.04 (I'm using Ubuntu Mate specifically). With 5.11.2? If this is a reproducible issue, then we can file this?

                      I just did this test with both a VM and a native install of Ubuntu Mate 16.04. Both had identical issues.

                      Alright, so after some finangling I figured out it was segfaulting because the charts required that the C++ side of things (in QtCreator) NEED to use QApplication instead of QGuiApplication which is traditionally used when setting up default. So I got that to work in QtCreator. We're good on that side.

                      Now onto PyQt5...
                      How would I be able to get the qt5 charts working in PyQt5? It's missing a library since it's using an older version?

                      1 Reply Last reply
                      1
                      • B Offline
                        B Offline
                        Bits-n-Flips
                        wrote on last edited by
                        #11

                        and solved with pyqt5!
                        do a pip3 install of PyQtChart

                        and boom. Done.
                        That was a little round about but I'm glad it wasn't too messy overall. It could have been a lot worse...

                        So QtCreator Qt5.11.2 works with Qt5 charts
                        as well as PyQt5.

                        So for anyone else reading this forum post and is using Ubuntu 16.04 (I have seen some other posts around the web complaining of similar issues), follow the instructions in this thread and you should be good as well.

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

                          Glad you found out thanks for sharing !

                          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

                          • Login

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