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. Serial Port usage
Forum Updated to NodeBB v4.3 + New Features

Serial Port usage

Scheduled Pinned Locked Moved General and Desktop
19 Posts 5 Posters 14.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.
  • sierdzioS Offline
    sierdzioS Offline
    sierdzio
    Moderators
    wrote on last edited by
    #9

    Are you sure you've installed QtSerialPort correctly, then? Have you set QTDIR before running make install? It seems you have Qt4 that comes with Ubuntu. I have not tried using serial port with that version of Qt, I can't confirm it works (I'm building Qt myself).

    (Z(:^

    1 Reply Last reply
    0
    • MohammadsmM Offline
      MohammadsmM Offline
      Mohammadsm
      wrote on last edited by
      #10

      Yes,after installation,"QtSerialPort" folder created in includes folder:
      !http://www.8pic.ir/images/97864825867755441174.png(Serial Port)!

      1 Reply Last reply
      0
      • sierdzioS Offline
        sierdzioS Offline
        sierdzio
        Moderators
        wrote on last edited by
        #11

        I guess it looks for includes in /usr/include/qt4/4.8.1/include. Try adding this to your .pro file as a workaround, or reinstall QtSerialPort:
        @
        INCLUDEPATH += /usr/include/qt4
        @

        (Z(:^

        1 Reply Last reply
        0
        • MohammadsmM Offline
          MohammadsmM Offline
          Mohammadsm
          wrote on last edited by
          #12

          QtSerialPort defined to Qt, cause the compiler doesn't get error for the headers(first image).
          May be I have to try it with other versions of QtSerialPort.
          If you find a way to solve my problem, tell me please.
          In either case, Thank you all.

          1 Reply Last reply
          0
          • sierdzioS Offline
            sierdzioS Offline
            sierdzio
            Moderators
            wrote on last edited by
            #13

            Try including:
            @
            #include <QSerialPort>
            #include <QSerialPortInfo
            @
            instead. Maybe it sees the module headers but not the concrete ones. That's a shot in the dark, though.

            (Z(:^

            1 Reply Last reply
            0
            • MohammadsmM Offline
              MohammadsmM Offline
              Mohammadsm
              wrote on last edited by
              #14

              Thank you very much sierdzio,
              No different:
              !http://www.8pic.ir/images/72918578813541034521.png(Serial Port)!

              1 Reply Last reply
              0
              • K Offline
                K Offline
                kuzulis
                Qt Champions 2020
                wrote on last edited by
                #15

                Mohammadsm,

                1. Try to remove all QtSerialPort parts from system - to remove all directories from /usr/include/qt4/QtSerialPort and all *.so (by searching), etc. from system directories of your Ubuntu (I don't know where to place in Ubuntu packages with Qt4/Qt5 are installed, I don't use Ubuntu).

                2. Try rebuild and reinstall QtSerialPort from QtCreator. It will allow to generate Makefile with the necessary QTDIR, etc. automatically, just do:

                • open qtserialport.pro with your Qt4.8.1 kit
                • add to QtCreator tab with "project build configuration page" the new Make target like "sudo install"
                • rebuild library

                In this case the library will be compiled and be installed automatically from QtCreator.

                PS: here I am not sure that "sudo" will correctly be executed from QtCreator, I didn't check.

                1. If "sudo" isn't executed, you run the terminal, cd to a build directory with library (like "qtserialport-build-4_8_1_Desktop-Release") and execute manually "sudo install" from terminal. It has to help.
                1 Reply Last reply
                0
                • MohammadsmM Offline
                  MohammadsmM Offline
                  Mohammadsm
                  wrote on last edited by
                  #16

                  Yessss,I made it,finally.I found where was the bug!
                  !http://www.8pic.ir/images/09264115279337141243.png(Serial Port)!
                  The "QT_MAJOR_VERSION" was "5".
                  This source provided for Qt5, I just changed the version number.
                  !http://www.8pic.ir/images/99918515869336409977.png(Serial Port)!

                  Thank you all,very much

                  1 Reply Last reply
                  0
                  • T Offline
                    T Offline
                    tobias.hunger
                    wrote on last edited by
                    #17

                    Is this a special ubuntu phone SDK creator or are those ubuntu plugins part of every Qt Creator installation on ubuntu?

                    1 Reply Last reply
                    0
                    • MohammadsmM Offline
                      MohammadsmM Offline
                      Mohammadsm
                      wrote on last edited by
                      #18

                      If I understand you, it's the external Ubuntu Phone SDK not included in Qt and I installed it form "Go moile":http://developer.ubuntu.com/get-started/gomobile/.
                      !http://www.8pic.ir/images/15454816010375575771.png(Ubuntu Phone SDK)!

                      1 Reply Last reply
                      0
                      • T Offline
                        T Offline
                        tobias.hunger
                        wrote on last edited by
                        #19

                        /me sighs.

                        Did they really break keyboard shortcuts for that stupid page? We made the welcome mode extendable so that people can put their pages there together with the others...

                        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