![]() Registered Member ![]()
|
Hi,
I'm totally new to GUI programming. These are my first steps. Anyway, I installed Kdevelop 4.0.1 (on Gentoo) and I started to follow the tutorials on techbase. When I got to the KXMLGUI part, I couldn't get the Toolbar to work:
I even tried installing the project, but that didn't help either. So now I''m stuck. Do you have any idea how I could get this to work? Thanks.
Last edited by keba on Tue Aug 03, 2010 7:03 am, edited 1 time in total.
|
![]() KDE Developer ![]()
|
It could be a matter of search paths, e.g. the prefix you are installing to not being one KDE uses to search for resources.
Check the output of
In the shell you are running your program from. Cheers, _
anda_skoa, proud to be a member of KDE forums since 2008-Oct.
|
![]() Registered Member ![]()
|
Thanks, you're right. I get
So since I'm still developing testing this stuff, I just made a link into /home/me/.kde4/share/apps/ to where the *ui.rc file is actually located. This way, everything works totally fine:
|
![]() KDE Developer ![]()
|
XMLGUI requires the ui.rc files in "installed" paths, be it the KDE system prefixes or the ~/.kde(4). Running an uninstalled XMLGUI application without already "installed" ui.rc file will not work.
Pino Toscano
|
![]() Registered Member ![]()
|
That explains it. Although this also means that I'll have to check the installation process since it didn't work even after installing my "test" app... Anyway, thanks
|
![]() Registered Member ![]()
|
You must have in your CMakeLists.txt something like
|
![]() Registered Member ![]()
|
This line was in there, but it seems that the files don't get installed in the correct kde4 path, which for me is /usr, because the variable isn't set correctly. This is a problem with my distro settings though...
|
![]() Administrator ![]()
|
When running cmake, you need to pass the following argument: -DCMAKE_INSTALL_PREFIX=/usr
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
![]() Registered Member ![]()
|
Oh. Thanks a lot. I'm sorry for these stupid questions, I'm really new to all of this.
|
![]() KDE Developer ![]()
|
While this is technically correct, I would recommend not never ever install into the prefix used by the system itself.
By default CMake will install into prefix /usr/local, which is much more preferable for locally build or otherwise locally installed software. For development it is also often useful to install into a totally different prefix, as it allows to remove the files installed during development by just removing the whole prefix. The actual problem here, which we can already see in th second reply, is that the installation prefix used is not part of KDE's search path. So instead of working around that by installing into one that is, it is far more useful to just extend the search path list so KDE also looks in the prefix the software is installed to. KDE has environment variables for this, e.g. KDEDIRS, and ways to even set that for the whole KDE session. Say, for example, that /usr/local is not yet in the search path and software should be installed there. 1) create a file (name doesn't matter, has to have the .sh extension though) which extends the variable
2) put it into one of KDE's environment extender directories, e.g. for one user only
Cheers, _
anda_skoa, proud to be a member of KDE forums since 2008-Oct.
|
Registered users: Bing [Bot], blue_bullet, Google [Bot], rockscient, Yahoo [Bot]