Whats wrong with QT-Designer and KDE-Widgets ?

Torsten Evers tevers at t-online.de
Sun Feb 25 11:16:19 GMT 2001


Hi !

Since I got no answer to  my problem on kde-devel mailinglist so far, I try 
it here too:

I encounter the following problem on my System:

I have several apps using KDE ListView widgets. All my apps are now based on 
QT Designer *.ui files. When creating the dialogs with designer and inserting 
a KListView widget all seems to be ok. The program compiles without any  
error and works as it is supposed to do.

Now comes the trick. I change e.g. the selection mode from "single" to 
"multi". Now I am not able to compile the app because the compiler complains:
...
echo '#include "ktestdlg.moc"' >> ktestdlg.cpp
g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/local/kde/include 
-I/usr/lib/qt-2.2.4/include -I/usr/X11R6/include     -O2 -fno-exceptions 
-fno-check-new -Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes 
-Wwrite-strings -Wno-long-long -fno-builtin -O0 -g3 -Wall  -c ktestdlg.cpp
ktestdlg.cpp: In method `KTestDlg::KTestDlg (QWidget *, const char *, 
bool, unsigned int)':
ktestdlg.cpp:50: no matching function for call to 
`KListView::setSelectionMode (KListView::SelectionModeExt)'
/usr/lib/qt-2.2.4/include/qlistview.h:248: candidates are: void 
QListView::setSelectionMode 
(QListView::SelectionMode)
gmake[2]: Leaving directory `/usr/apps/develop/ktryout/ktryout'
gmake[2]: *** [ktestdlg.o] Error 1
gmake[1]: Leaving directory `/usr/apps/develop/ktryout'
gmake[1]: *** [all-recursive] Error 1
gmake: *** [all-recursive-am] Error 2
*** Fehler ***

To reproduce the error I set up a new KDE 2 mini project and simply added a 
ui dialog file with a KListView and a Pushbutton. Then I connected the Button 
with accept() of the dialog and inserted code to create the dialog on a mouse 
button click. At this time all is fine. I can compile and start the app and 
the window pops up and I can click on the view and my dialog is shown.
Now I open the *.ui and simply change the Selection mode to "multi" now 
compiling stops with the above message.
I found that the call to KListView::setSelectionMode is wrong, it should be 
KListView::setSelectionModeExt would be correct. When I change this in the 
uic generated files and compile, all works fine. But this only works until 
uic is called again, because the generated files are now overwritten.

My System looks like this:
RedHat 7 with 
glibc-2.2-9
gcc-2.96-74
gcc-c++-2.96-74
libstdc++-2.96-74
kde-2.1beta2
qt-2.2.4 (self compiled rpm with kde support enabled switches during compile: 
./configure -release -static -gif -sm -system-libmng -system-zlib 
-system-libpng -system-jpeg -kde -no-g++-exceptions -threadT)

I should mention that on KDE you have to copy the KDE include  subdir to 
/usr/local/kde/include and make a /usr/local/kde/bin directory with 
"dcopserver" in it to allow QT to compile because RedHat has this damn 
splittet KDE directory tree with
/usr/include/kde
instead of 
/usr/include

Any hints what causes this problem and what I can do to fix it ?

Bye,
Torsten
-- 
**************************************************************
* Torsten Evers      ICQ: 58016070        tevers at t-online.de *
* ---   All messages generated on Linux 2.4.0 system    --- *
**************************************************************



-
to unsubscribe from this list send an email to kdevelop-request at kdevelop.org with the following body:
unsubscribe »your-email-address«



More information about the KDevelop mailing list