KDevelop and the Qt Designer

Reginald Stadlbauer reggie at trolltech.com
Tue Aug 15 10:27:39 UTC 2000


On Tue, 15 Aug 2000, you wrote:
> Hi!
>
> I added the following lines to ckdevelop_noslot.cpp around line 690 (in
> the void CKDevelop::switchToFile(QString filename, bool
> bForceReload,bool bShowModifiedBox) method):
>
>   // Load QtDesigner if clicked/loaded an User Interface file (.ui)
>   if( filename.right(3) == ".ui") {
>     if(!CToolClass::searchProgram("designer")){
>       debug("QtDesigner not fount!");
>       return;
>     }
>     showOutputView(false);
>     s_tab_view->setCurrentTab(TOOLS);
>     swallow_widget->sWClose(false);
>     swallow_widget->setExeString("designer -client " + filename);
>     swallow_widget->sWExecute();
>     swallow_widget->init();
>     return;
>   }
>
>
> This launches QtDesigner (provided the designer binary is in the PATH)
> when opening a .ui file but the QtDesigner ask to "choose a template for
> the new form" and then create a new form so we end up with both the
> right old form from the file we open and a new form that we don't need.

It only asks that if the file you specify doesn't exist yet (then it opens 
the template dialog so that you can choose the template which should be used 
for that new file). Else the file is opened. Could it be that somehow the 
path of the file got wrong or so - at least looks for me like you specified a 
non-existing file.

> Is there another command instead of "designer -client filename" so that
> no new form is created ?

Yes, specifying an existing file :-))

-- 
Reggie (reggie at trolltech.com)




More information about the KDevelop mailing list