[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: Change Konsole fonts in a KPart Konsole
From: Giacomo <delleceste () gmail ! com>
Date: 2007-12-19 14:50:42
Message-ID: 885896af0712190650x3983be1fl84db7fa1470b70a5 () mail ! gmail ! com
[Download RAW message or body]
Yes of course but the font in the console does not change.
Here is the short piece of code:
KParts::ReadOnlyPart *part = static_cast<KParts::ReadOnlyPart *>
(factory->create(this, "KParts::ReadOnlyPart"));
// start the terminal
terminal = qobject_cast<TerminalInterface*>(part);
if(!terminal)
{
QMessageBox::information(this, "error",
"Problems creating a terminal interface part!\n"
"The console will not be available!");
return;
}
if(part->widget() != NULL)
part->widget()->setFont(QFont("", 7));
KGlobal::locale()->insertCatalog("konsole");
KXMLGUIFactory *gui_factory = mainWin->guiFactory();
// // gui_factory->addClient(part);
Moreover, the last call gui_factory->addClient(part);
produces as a result the comparison of a MenuBar that places itself
over the menuBar of my KMainWindow with menus saying
"No Text".
Can you tell me why this happens?
Thanks in advance
Giacomo
2007/12/18, Robert Knight <robertknight@gmail.com>:
> > Can anybody tell me how to do to change the fonts of a Konsole
> > in my application which is there as a KPart?
>
> The normal approach to change a widget's font is to call setFont() on
> the widget. The KPart's widget can be retrieved through the widget()
> method.
>
> Regards,
> Robert.
>
> On 17/12/2007, Giacomo <delleceste@gmail.com> wrote:
> > Good morning
> > Can anybody tell me how to do to change the fonts of a Konsole
> > in my application which is there as a KPart?
> >
> > Moreover, how can i do to personalize the right click menu on that KPart
> > Konsole (add/remove items, is it possible?)?
> >
> > If I add the console as a client to the KXMLGuiFactory, a menu bar
> > appears with "No Text" in each menu title and it puts itself over the
> > menu bar of my application..
> >
> > can anybody give me some hints to solve this?
> > Thank you
> >
> > Giacomo
> >
> > --
> > Giacomo S.
> > http://www.giacomos.it
> >
> > - - - - - - - - - - - - - - - - - - - - - -
> >
> > IPFIREwall (http://www.giacomos.it/ipfire) viene presentato
> > all'Universita` degli Studi di Udine, il 28 ottobre, in occasione del
> > Linux Day 2006:
> > http://iglu.cc.uniud.it/linuxday
> >
> > - - - - - - - - - - - - - - - - - - - - - -
> >
> > . '' `.
> > : :' :
> > `. ` '
> > `- Debian GNU/Linux -- The power of freedom
> > http://www.debian.org
> >
> > >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
> >
>
> >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
>
--
Giacomo S.
http://www.giacomos.it
- - - - - - - - - - - - - - - - - - - - - -
IPFIREwall (http://www.giacomos.it/ipfire) viene presentato
all'Universita` degli Studi di Udine, il 28 ottobre, in occasione del
Linux Day 2006:
http://iglu.cc.uniud.it/linuxday
- - - - - - - - - - - - - - - - - - - - - -
. '' `.
: :' :
`. ` '
`- Debian GNU/Linux -- The power of freedom
http://www.debian.org
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic