Trolltech Home | Qt-jambi-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 1

Qt-jambi-interest Archive, January 2008
Problem with "Promote to custom widget" using the Designer (Jambi version 4.3.3_01)


Message 1 in thread

Hi everyone,
My situation is the following:
I have to deal with a GUI that was build back in the days where you had to convert .ui files to .jui if you wanted to use the Designer. The program is dependent on a promoted custom widget (In my case that would be a class that extends QGraphicsView). 
The problem:
In the current jambi version I cant use the designer to modify the .jui file because it no longer allows promoted widgets. If I try, the designer replaces my class with the one I inherited from and if I try to use the right-click menue "Promote to ..." to promote new widget I get a message stating that "This feature is not aviable in Qt Jambi".

Is there a way to circumvent that problem without having to edit the .jui files with a text editor myself?


Message 2 in thread

Huebner Florian wrote:
> In the current jambi version I cant use the designer to modify the .jui file because it no longer allows promoted widgets. If I try, the designer replaces my class with the one I inherited from and if I try to use the right-click menue "Promote to ..." to promote new widget I get a message stating that "This feature is not aviable in Qt Jambi".
>
> Is there a way to circumvent that problem without having to edit the .jui files with a text editor myself?
>   

Hi,

Thank you for the report. I will register this problem with our bug 
tracker.

The "Promote to custom widget" feature in Qt Designer for C++ is 
primarily a result of the fact that it requires some additional work to 
make a custom widget available to Designer in C++, and the 
widget-promotion feature covers a lot of use cases with very little 
effort involved. For Qt Jambi and the Qt Jambi Eclipse Integration, 
making custom widgets is a lot easier, so the decision was made to 
disable widget-promotion rather than implement a Java-based version, as 
it is no longer relevant.

I believe this was unfortunately done without regard to ported .ui 
files, and I definitely see this as a problem.

Currently, the only work around as far as I can tell is to replace your 
promoted widgets with proper custom widgets. This might be preferable 
anyway, as they will appear and act as they are going to in the actual 
application.

    
http://doc.trolltech.com/qtjambi-4.3.3_01/com/trolltech/qt/qtjambi-eclipse.html#adding-custom-widgets

We'll also investigate what we can do for people with ported .ui files 
to avoid this issue in the future.

-- Eskil