Registered Member
|
Using linux arch, qt 4.8
I use kdevelop for many years. From last update 15/05 i got several problem with project template. using qt I create new project with template kde --> kgraphical Source is a bit different from the past in this position --->>>#include <QtDeclarative/QDeclarativeView> --->>>#include <QtDeclarative/QDeclarativeProperty> --->>>#include <QtDeclarative/QDeclarativeItem> KGraphicalTestView::KGraphicalTestView(QWidget *) { view = new QDeclarativeView(this); --->>> view->setSource(QUrl::fromLocalFile(KStandardDirs::locate("data", "kgraphicaltest/src/qml/main.qml"))); --->>> kcfg_sillyLabel = view->rootObject(); @@@@--->>> kcfg_sillyLabel->setProperty("width", width()); --->>> QDeclarativeProperty(kcfg_sillyLabel, "width").write(width()); kcfg_sillyLabel->setProperty("height", height()); QDeclarativeProperty(kcfg_sillyLabel, "height").write(height()); QObject::connect(kcfg_sillyLabel, SIGNAL(clicked()), qApp, SLOT(quit())); view->show(); settingsChanged(); } build project when running project crash on point @@@@, where the file "......" is not found I think there is a mix of qt4 and qt5, but how to solve it ? thanks tino |
Administrator
|
It looks to me like those are source code merge conflict markers.
Assuming you did not add the "--->>>" or "@@@@--->>>" please remove those and try again.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered Member
|
I put marking to signal the "bad" point. They do not exist ! Tino |
Administrator
|
My guess would be that your project is not being installed in the paths which KDE applications (including your project/app) search for their materials.
This is done in:
If you run "export KDEDIRS=$(kde4-config --prefix):/path/to/install/dir" prior to trying to start your application, does that have any effect? You will need to change "/path/to/install/dir/" to where you are installing your project (which is necessary for this to work).
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered Member
|
I have always problem to understand "/path/to/install/dir", is this for project or for KDE ? anyway I made this
I prune the project and rebuild this is the execute result:
|
Administrator
|
The "installation directory" i'm referring to is where your project is installed - building it is not sufficient.
You can specify where to install it at configure time, using the "-DCMAKE_INSTALL_PREFIX=/install/location" argument - replacing "/install/location" with the path where you want the application to be installed. Once built, you need to run "make install" to perform the installation to that location. An example would be "/workarea/installs/" for instance.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered Member
|
Thank bccoksley,
I try to follow yours suggestions without success. first of all I check CMakeCache.txt on the build directory "../workarea/projects/KGraphicalTest/build" that is:
then I make these actions on the konsole inside KDEVELOP:
obtainig this
then I install the project:
then I try to run directly from KDE and from KDEVELOP but the resul is the same:
It is normal that the enviroment of KDEVELOP is so ? I hope all these info can help to give me more adjustment. thanks |
Administrator
|
Sorry, I'm not sure what is going on at this point - please note that i've never worked with QML.
I would suggest asking on the kde-devel@kde.org mailing list at this point, as people there may know more.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered Member
|
I find a temporary solution to the problem:
this is the original, from "kgraphicaltestview.cpp", main class is "KGraphicalTest" and "KGraphicalTestview" :
first problem: the template put "kgraphicaltest" but really the directory is "KGraphicalTest" so I make the first modification (NOT WORKING):
this works, inside kdevelop:
but the question now is : when I want to run as system where point the projects ? thanks |
Administrator
|
This is why it is necessary to ensure KDEDIRS is set properly. Unfortunately it doesn't seem to work properly within KDevelop for you.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered users: bartoloni, Bing [Bot], Google [Bot], Sogou [Bot]