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. Porting from QT4.6 to QT5
Forum Updated to NodeBB v4.3 + New Features

Porting from QT4.6 to QT5

Scheduled Pinned Locked Moved Unsolved General and Desktop
44 Posts 8 Posters 13.4k Views 5 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.
  • mrjjM mrjj

    @Qt-Enthusiast
    just use the c++ versions
    true
    false
    (in small letters)

    Q Offline
    Q Offline
    Qt Enthusiast
    wrote on last edited by
    #19

    @mrjj
    is FALSE and TRUE defined in qt4 code

    JKSHJ 1 Reply Last reply
    0
    • Q Qt Enthusiast

      @mrjj
      is FALSE and TRUE defined in qt4 code

      JKSHJ Offline
      JKSHJ Offline
      JKSH
      Moderators
      wrote on last edited by
      #20

      @Qt-Enthusiast said in Porting from QT4.6 to QT5:

      is FALSE and TRUE defined in qt4 code

      No.

      Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

      1 Reply Last reply
      1
      • Q Offline
        Q Offline
        Qt Enthusiast
        wrote on last edited by
        #21

        Then why I am getting this error when I am changing the library to Qt5

        jsulmJ JKSHJ 2 Replies Last reply
        0
        • Q Qt Enthusiast

          Then why I am getting this error when I am changing the library to Qt5

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #22

          @Qt-Enthusiast Do you use same compiler for both Qt versions?

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          Q 1 Reply Last reply
          1
          • Q Qt Enthusiast

            Then why I am getting this error when I am changing the library to Qt5

            JKSHJ Offline
            JKSHJ Offline
            JKSH
            Moderators
            wrote on last edited by
            #23

            @Qt-Enthusiast said in Porting from QT4.6 to QT5:

            Then why I am getting this error when I am changing the library to Qt5

            Because you also changed your compiler?

            Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

            1 Reply Last reply
            2
            • jsulmJ jsulm

              @Qt-Enthusiast Do you use same compiler for both Qt versions?

              Q Offline
              Q Offline
              Qt Enthusiast
              wrote on last edited by
              #24

              @jsulm

              Yes
              I changed just the qt version. What is significance of Q_NULLPTR

              jsulmJ 1 Reply Last reply
              0
              • Q Qt Enthusiast

                @jsulm

                Yes
                I changed just the qt version. What is significance of Q_NULLPTR

                jsulmJ Offline
                jsulmJ Offline
                jsulm
                Lifetime Qt Champion
                wrote on last edited by jsulm
                #25

                @Qt-Enthusiast Well, if you search a bit you will find this in Qt source:

                #ifdef Q_COMPILER_NULLPTR
                # define Q_NULLPTR         nullptr
                #else
                # define Q_NULLPTR         NULL
                #endif
                

                If you have a C++11 compiler Q_NULLPTR will be nullptr, else it will be the old C/C++ NULL.
                You can use Q_NULLPTR if you have to support older C++ compilers which do not know anything about nullptr and newer C++ compilers.

                https://forum.qt.io/topic/113070/qt-code-of-conduct

                1 Reply Last reply
                4
                • Q Offline
                  Q Offline
                  Qt Enthusiast
                  wrote on last edited by
                  #26

                  how to solve the following error

                  error: no matching function for call to 'QGraphicsTextItem::QGraphicsTextItem(const char [5], int, QGraphicsScene*&)'
                  cursor = new QGraphicsTextItem("0, 0", 0, scene);

                  jsulmJ 1 Reply Last reply
                  0
                  • Q Qt Enthusiast

                    how to solve the following error

                    error: no matching function for call to 'QGraphicsTextItem::QGraphicsTextItem(const char [5], int, QGraphicsScene*&)'
                    cursor = new QGraphicsTextItem("0, 0", 0, scene);

                    jsulmJ Offline
                    jsulmJ Offline
                    jsulm
                    Lifetime Qt Champion
                    wrote on last edited by
                    #27

                    @Qt-Enthusiast Go here and check what constructors QGraphicsTextItem has: http://doc.qt.io/qt-5/qgraphicstextitem.html

                    https://forum.qt.io/topic/113070/qt-code-of-conduct

                    1 Reply Last reply
                    2
                    • Q Offline
                      Q Offline
                      Qt Enthusiast
                      wrote on last edited by
                      #28

                      Hi
                      I saw
                      http://doc.qt.io/qt-5/qgraphicsscene.html

                      QGraphicsItem * itemAt(const QPointF &position, const QTransform &deviceTransform) const
                      QGraphicsItem * itemAt(qreal x, qreal y, const QTransform &deviceTransform) const

                      buit still could not find the correct fix for compliation error

                      What const QTransform &deviceTransform shall I use

                      error: no matching function for call to 'QGraphicsScene::itemAt(QPointF&)'
                      QPointF m ;
                      QGraphicsItem *currentItem = scene->itemAt(m);

                      jsulmJ 1 Reply Last reply
                      0
                      • Q Qt Enthusiast

                        Hi
                        I saw
                        http://doc.qt.io/qt-5/qgraphicsscene.html

                        QGraphicsItem * itemAt(const QPointF &position, const QTransform &deviceTransform) const
                        QGraphicsItem * itemAt(qreal x, qreal y, const QTransform &deviceTransform) const

                        buit still could not find the correct fix for compliation error

                        What const QTransform &deviceTransform shall I use

                        error: no matching function for call to 'QGraphicsScene::itemAt(QPointF&)'
                        QPointF m ;
                        QGraphicsItem *currentItem = scene->itemAt(m);

                        jsulmJ Offline
                        jsulmJ Offline
                        jsulm
                        Lifetime Qt Champion
                        wrote on last edited by jsulm
                        #29

                        @Qt-Enthusiast http://doc.qt.io/qt-5/qgraphicsscene.html#itemAt has two parameters not one.
                        Try to pass QTransform() as second parameter.

                        https://forum.qt.io/topic/113070/qt-code-of-conduct

                        1 Reply Last reply
                        0
                        • Q Offline
                          Q Offline
                          Qt Enthusiast
                          wrote on last edited by
                          #30

                          I am getting issue

                          I am getting errors like

                          file.cxx: In member function 'bool fileMgr::showURL(QString)':
                          error: 'QWebView' does not name a type
                          340 static QWebView *sBrowser = NULL;
                          341 ^

                          I tried to do
                          #include QtWebKitWidgets
                          #include QtWebView

                          It is giving me an error that not able to find file QtWebKitWidgets .

                          can some one help me in solving the problem

                          JKSHJ 1 Reply Last reply
                          0
                          • Q Qt Enthusiast

                            I am getting issue

                            I am getting errors like

                            file.cxx: In member function 'bool fileMgr::showURL(QString)':
                            error: 'QWebView' does not name a type
                            340 static QWebView *sBrowser = NULL;
                            341 ^

                            I tried to do
                            #include QtWebKitWidgets
                            #include QtWebView

                            It is giving me an error that not able to find file QtWebKitWidgets .

                            can some one help me in solving the problem

                            JKSHJ Offline
                            JKSHJ Offline
                            JKSH
                            Moderators
                            wrote on last edited by
                            #31

                            @Qt-Enthusiast said in Porting from QT4.6 to QT5:

                            It is giving me an error that not able to find file QtWebKitWidgets .

                            can some one help me in solving the problem

                            See https://forum.qt.io/topic/76739/webkit-status-2017

                            Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                            1 Reply Last reply
                            3
                            • Q Offline
                              Q Offline
                              Qt Enthusiast
                              wrote on last edited by
                              #32

                              I am using solution

                              #include <QtWebKit/QtWebKit>
                              #include <QtWebKitWidgets/QtWebKitWidgets>

                              is that solution Ok

                              jsulmJ JKSHJ 2 Replies Last reply
                              0
                              • Q Qt Enthusiast

                                I am using solution

                                #include <QtWebKit/QtWebKit>
                                #include <QtWebKitWidgets/QtWebKitWidgets>

                                is that solution Ok

                                jsulmJ Offline
                                jsulmJ Offline
                                jsulm
                                Lifetime Qt Champion
                                wrote on last edited by
                                #33

                                @Qt-Enthusiast Why not simply

                                #include <QWebView>
                                ```?

                                https://forum.qt.io/topic/113070/qt-code-of-conduct

                                1 Reply Last reply
                                0
                                • Q Qt Enthusiast

                                  I am using solution

                                  #include <QtWebKit/QtWebKit>
                                  #include <QtWebKitWidgets/QtWebKitWidgets>

                                  is that solution Ok

                                  JKSHJ Offline
                                  JKSHJ Offline
                                  JKSH
                                  Moderators
                                  wrote on last edited by
                                  #34

                                  @Qt-Enthusiast said in Porting from QT4.6 to QT5:

                                  is that solution Ok

                                  Did you read the link I gave you?

                                  Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                                  1 Reply Last reply
                                  0
                                  • Q Offline
                                    Q Offline
                                    Qt Enthusiast
                                    wrote on last edited by
                                    #35

                                    yesI read that from there only I found out and I wanted to confirm the same

                                    JKSHJ 1 Reply Last reply
                                    0
                                    • Q Qt Enthusiast

                                      yesI read that from there only I found out and I wanted to confirm the same

                                      JKSHJ Offline
                                      JKSHJ Offline
                                      JKSH
                                      Moderators
                                      wrote on last edited by
                                      #36

                                      @Qt-Enthusiast said in Porting from QT4.6 to QT5:

                                      yesI read that from there only I found out and I wanted to confirm the same

                                      You don't need to ask to confirm. You can confirm yourself by trying it.

                                      Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                                      1 Reply Last reply
                                      3
                                      • Q Offline
                                        Q Offline
                                        Qt Enthusiast
                                        wrote on last edited by
                                        #37

                                        QStyleOptionViewItemV4' is deprecated , what should be the solution to fix this

                                        fatal error: QCleanlooksStyle: No such file or directory
                                        compilation terminated.

                                        how to solve these errors

                                        mrjjM 1 Reply Last reply
                                        0
                                        • Q Qt Enthusiast

                                          QStyleOptionViewItemV4' is deprecated , what should be the solution to fix this

                                          fatal error: QCleanlooksStyle: No such file or directory
                                          compilation terminated.

                                          how to solve these errors

                                          mrjjM Offline
                                          mrjjM Offline
                                          mrjj
                                          Lifetime Qt Champion
                                          wrote on last edited by mrjj
                                          #38

                                          @Qt-Enthusiast
                                          Hi
                                          You can use QStyleOptionViewItem directly.

                                          QCleanlooksStyle is worse. why does app need its includes ?
                                          You can compile the old style plugin by yourself, but now is a good
                                          opportunity to get rid of it. So please tell why app needs it.

                                          Any how, its all explained here
                                          http://doc.qt.io/qt-5/sourcebreaks.html
                                          read Changes to QStyle
                                          It also says how to get it back if needed.

                                          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