Results 1 to 11 of 11

Thread: Questions about Qt Creator 3.0.1

  1. #1
    Join Date
    Jul 2006
    Posts
    42
    Thanks
    13
    Qt products
    Qt3
    Platforms
    Unix/X11

    Default Questions about Qt Creator 3.0.1

    Hi,

    I am not sure my questions have been asked by others or not. If so, please let me know where I can find the answers.

    1. I have installed Qt 5.2.1 on my Centos 6.5. It has Qt Creator 3.0.1 (Based on Qt 5.2.1 (GCC 4.4.7 (Red Hat 4.4.7-4), 64 bit)). Everything seems working OK except I just found out the QUdpSocket did not have the member function of joinMulticastGroup() (not found in the lib anywhere.) Is there any way I could "fix" it.

    2. I just download Qt 5.3 (qt-opensource-Linux-x64-5.3.0.run). I am thinking to install this version into my Centos. Is there anyone has this version on Centos knows that the joinMultcastGroup() is included?

    3. If I do install Qt 5.3, should I un-install Qt 5.2.1 before installing Qt 5.3?

    Thanks in advance

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Questions about Qt Creator 3.0.1

    How did you determine that the function is not there?

    According to the documentation http://qt-project.org/doc/qt-5/qudps...MulticastGroup this function exists since Qt4.8

    Cheers,
    _

  3. #3
    Join Date
    Jul 2006
    Posts
    42
    Thanks
    13
    Qt products
    Qt3
    Platforms
    Unix/X11

    Default Re: Questions about Qt Creator 3.0.1

    Quote Originally Posted by anda_skoa View Post
    How did you determine that the function is not there?

    According to the documentation http://qt-project.org/doc/qt-5/qudps...MulticastGroup this function exists since Qt4.8

    Cheers,
    _
    According to my understanding, the function should be in Qt5.2.1, but it is not in my system. There are two signs to indicate the statement I made earlier:
    1. Compile error: class QUdpSocket has no member named 'joinMulticastGroup'
    2. I checked the usr/include/QtNetwork/qudpsocket.h, the file was dated as "2010 Nokia Corporation ... "Sure enough the function is not in the header file.

    I went to install Qt5.3 anyway. Although the installation was failed to load core: LibCore.so, I could see the Qt5.3's qudpsocket.h has the functions (two overloaded functions) in the header file. And the file was dated as "2013 Digia Plc .... "

    At this point, Qt5.2.1 could not compile if the joinMulticastGroup is called. Qt5.3 could not be installed. I will appreciate any one who could tell me how to fix either version of Qt.

  4. #4
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Questions about Qt Creator 3.0.1

    Quote Originally Posted by mp33919 View Post
    1. Compile error: class QUdpSocket has no member named 'joinMulticastGroup'
    2. I checked the usr/include/QtNetwork/qudpsocket.h, the file was dated as "2010 Nokia Corporation ... "Sure enough the function is not in the header file.
    Are you sure that header is from Qt5? Maybe it is from an earlier version of Qt4, as I wrote, the method was added in Qt4.8

    Cheers,
    _

  5. #5
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Questions about Qt Creator 3.0.1

    Quote Originally Posted by mp33919 View Post
    2. I checked the usr/include/QtNetwork/qudpsocket.h, the file was dated as "2010 Nokia Corporation ... "Sure enough the function is not in the header file.
    It is very unlikely /usr/include contains a Qt 5 installation. If Qt5 was installed with your system, it is probably located in /usr/share/qt5 or similar (with includes in /usr/include/qt5/ ?). If you installed Qt5 separately then you should know best where you installed it. Either way it is easy to verify which Qt version you are running by issuing a "qmake -v" which will return the version number and location of the Qt installation being used.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  6. #6
    Join Date
    Jul 2006
    Posts
    42
    Thanks
    13
    Qt products
    Qt3
    Platforms
    Unix/X11

    Default Re: Questions about Qt Creator 3.0.1

    I am very sure that the Qt 5.X did not use the Qt 5.X's lib. I had multiple versions (from Qt 3.X to Qt 4.X)of Qt installed in the machine. How can I make the Qt5.X knows where to find the correct version of lib and header files?
    The Qt5.X is installed in /home/me/Qt5.2.1

  7. #7
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Questions about Qt Creator 3.0.1

    make sure you are invoking the correct qmake executable on your .pro file.

    Cheers,
    _

  8. #8
    Join Date
    Jul 2006
    Posts
    42
    Thanks
    13
    Qt products
    Qt3
    Platforms
    Unix/X11

    Default Re: Questions about Qt Creator 3.0.1

    Wysota & anda_skoa,

    Thanks you two responded my question. Earlier, for some reasons, the command "qmake" did not work. Then, for some strange reasons, it works now. The "qmake -v" returns "Qmake version: 1.07a (Qt 3.3.8b). I am not surprised that is the old-old-old version I have in my system. I could not get rid of it yet because I have many old version's Qt programs need to be supported. Now, I know the problem, but I don't know how to fix it: I don't know how to make my Qt5.2.1 (installed in /home/me/Qt5.2.1) knows which include files and libs to use. I don't know how to invoking the correct qmake executable on my .pro file. I use Qt5.2.1's qtcreator. This is mymulticastrecv.pro looks:
    QT += core gui network
    greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

    TARGET = mymulticastrecv
    TEMPLATE = app

    INCLUDEPATH += /home/me/Qt5.2.1/5.2.1/gcc_64/include
    SOURCES += main.cpp\
    mainwindow.cpp\
    dbconnection.cpp

    HEADERS += mainwindows.h\
    dbconnection.h

    FORMS += mainwindow.ui

    Thanks in advance!

  9. #9
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Questions about Qt Creator 3.0.1

    First of all go to Creator's options, switch to "Build & Run" pane and then "Qt versions" tab. See if your Qt5 installation is detected properly (most likely it is not). If not, click the "Add" button and using the file dialog which pops up find the qmake binary corresponding to the Qt version you are looking for (/home/me/Qt5.2.1/gcc_64/bin/qmake). Then switch to "Kits" tab and see if there is a kit that uses your desired Qt version. If not, click add and make sure the "Qt version" list points to the proper Qt version. Then you can close the dialog and go to your project settings. In the "Build and Run" tab click on "Add kit" and add the kit you just created. Then you can remove the INCLUDEPATH entry from your project definition file.

    The next thing you can do is to make sure you have qtchooser installed and then configure all the versions of Qt that you have in it. man qtchooser is your friend.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  10. The following user says thank you to wysota for this useful post:

    mp33919 (11th August 2014)

  11. #10
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Questions about Qt Creator 3.0.1

    Quote Originally Posted by mp33919 View Post
    Now, I know the problem, but I don't know how to fix it
    Easy, run the qmake executable of the version you want to use.

    Cheers,
    _

  12. #11
    Join Date
    Jul 2006
    Posts
    42
    Thanks
    13
    Qt products
    Qt3
    Platforms
    Unix/X11

    Default Re: Questions about Qt Creator 3.0.1

    It works. Thank you very much! Yes, I will find out the "qtchooser" and install it later. Right now, I have one more thing need to figure out: I have MySQL Server version 5.1.73 installed. I compiled the example "sqlbrowser" from Qt5.2.1, I could select the database (named: mydbtest) I created in MySQL and open it. But, in my own program, mymulticastrecv, I compiled it but I got "Driver not loaded" error when I executed my program. I just could not figure out what I need to do to make it work.
    Here is my mymulticastrecv.pro
    # add sql for mysql
    QT += core gui network sql

    DEPLOYMENT_PLUGIN += qmysql3
    Thanks again!

Similar Threads

  1. Qt creator Plugin questions
    By EpicViTTo in forum Newbie
    Replies: 12
    Last Post: 21st February 2013, 15:38
  2. Replies: 2
    Last Post: 22nd November 2011, 00:09
  3. two questions
    By jajdoo in forum Newbie
    Replies: 5
    Last Post: 18th July 2010, 21:12
  4. Replies: 7
    Last Post: 27th September 2009, 18:12

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.