Unsolved Porting from QT4.6 to QT5
-
@mrjj
is FALSE and TRUE defined in qt4 code -
-
Then why I am getting this error when I am changing the library to Qt5
-
@Qt-Enthusiast Do you use same compiler for both Qt versions?
-
@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?
-
Yes
I changed just the qt version. What is significance of Q_NULLPTR -
@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. -
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); -
@Qt-Enthusiast Go here and check what constructors QGraphicsTextItem has: http://doc.qt.io/qt-5/qgraphicstextitem.html
-
Hi
I saw
http://doc.qt.io/qt-5/qgraphicsscene.htmlQGraphicsItem * itemAt(const QPointF &position, const QTransform &deviceTransform) const
QGraphicsItem * itemAt(qreal x, qreal y, const QTransform &deviceTransform) constbuit 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); -
@Qt-Enthusiast http://doc.qt.io/qt-5/qgraphicsscene.html#itemAt has two parameters not one.
Try to pass QTransform() as second parameter. -
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 QtWebViewIt is giving me an error that not able to find file QtWebKitWidgets .
can some one help me in solving the problem
-
@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
-
I am using solution
#include <QtWebKit/QtWebKit>
#include <QtWebKitWidgets/QtWebKitWidgets>is that solution Ok
-
@Qt-Enthusiast Why not simply
#include <QWebView> ```?
-
@Qt-Enthusiast said in Porting from QT4.6 to QT5:
is that solution Ok
Did you read the link I gave you?
-
yesI read that from there only I found out and I wanted to confirm the same
-
@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.
-
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
-
@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.