[Kstars-devel] porting effort is stuck :(

Jason Harris kstars at 30doradus.org
Mon Nov 14 06:27:24 CET 2005


Hello,

Just a heads-up:

As you know, I have recently started porting files in the main kstars source 
directory.  Unfortunately, I have run into a small problem.  Some of our UI 
files use KDoubleNumInput, which has a different include file under kde4 than 
it did under kde3 (it was kdoublenuminput.h, it's now knuminput.h).  

The impact of this change is that we can't use the UI files as generated by 
Qt3 designer, because that file expects the old (wrong) include file.  So I 
tried to update the file by opening it in Qt4 designer (which is pretty 
slick, BTW).  There's just one problem: I can't get any of our custom widgets 
to work in Qt4 designer.  

In the old designer, you could just declare a custom widget, specify its 
include file, and go to work.  Qt4 designer does it a bit differently: you 
add a widget matching the baseclass of your custom widget, then right-click 
on it and select "Promote to custom widget".  You then get a dialog that asks 
for a name for the widget and an include file.  Unfortunately, it is not 
accepting my existing custom widgets.  The error message is: "DragListBox 
cannot be used as the class of the promoted widget, as a class of that name 
already exists and is not a promoted widget".  I can't see anywhere in the 
docs how I am supposed to specify that DragListBox is a "promoted" class, 
derived from KListBox.  I have asked on various fora (kde-devel, qtforum.org) 
and chat rooms, but I don't have an answer so far.

There's an alternative to the "Promoting" scheme, and that is to actually 
export a designer plugin library for our custom widgets.  I actually tried to 
get started on this, but I can't figure out hwo to get the Makefile magic 
working, and I haven't found a working example in another KDE app yet.

BTW, I am leaving town for 2 weeks+ on Wednesday (first to Chile, then to 
Baltimore), so I probably won't be doing much hacking until I return in early 
December.  My laptop is a powerbook, and I haven't yet figured out how to get 
kde4 compiling on OSX.  :/ 

regards,
Jason
-- 
KStars: KDE Desktop Planetarium
http://edu.kde.org/kstars


More information about the Kstars-devel mailing list