QGtkStyle: integrazione perfetta delle applicazione KDE in GNOME. Installazione ed uso


Gli sviluppatori Trolltech hanno sviluppato QGtkStyle, uno strumento che permette di dare uno stile GTK alle applicazioni native Qt, sotto GNOME. Il problema dell’integrazione visiva tra le applicazioni KDE e quelle GNOME, ha sempre afflitto i sistemi Gnu/Linux. In Windows e Mac OsX, Qt, ha sempre avuto stili specifici, basati sul tema nativo del sistema. Se però, gli utenti KDE, hanno a disposizione il ‘GTK-Qt Theme Engine‘, che consente di dare alle applicazione GTK uno stile Qt, non esisteva nulla di simile per GNOME. L’unica soluzione era Qt QCleanlooks, ma non assicurava una perfetta integrazione. Con QGtkStyle, che usa direttamente il motore del tema GTK+, le applicazioni KDE diventano praticamente identiche a quelle native per GNOME, proprio come accade in Windows e Mac. QGtkStyle è veramente interessante e facile da installare.

Installazione
Per poter compilare QGtkStyle, dovete avere GTK2, QT4 e il pacchetto gtk2-x11-dev installati. In Ubuntu Hardy Heron basta dare un semplice:
sudo apt-get install libgtk2.0-dev libqt4-dev
Poi assicuratevi di avere subversion installato:
sudo apt-get install subversion
e date questa serie di comandi:
svn co svn://labs.trolltech.com/svn/styles/gtkstyle
cd gtkstyle/
qmake && make
sudo make install
Ora, se tutto va per il verso giusto, non vi resta che installare Qt Configuration, lo strumento di configurazione di Qt4, con un semplice:
sudo apt-get install qt4-qtconfig
Terminata l’installazione lo trovate nel menù Sistema-> Preferenze-> Impostazioni Qt 4, apritelo e nella scheda ‘Appearance’, scegliete GTK come GUI Style, salvate (Ctrl+s) e noterete subito il cambiamento.

QGtkStyle funziona con tutte le applicazioni Qt4, come Skype e Last.fm e KWord, ma non con quelle basate su Qt3. Sono quindi supportate tutte le applicazioni per KDE4. Se riscontrate problemi nell’installazione di QGtkStyle, l’errore potrebbe essere dovuto al fatto qmake non sta usando la versione 4.x di Qt, controllate con:
qmake -v
se sta usando Qt3 date:
sudo update-alternatives –config qmake
e inserte il numero corrispondente a qmake-qt4, solitamente l’uno.
QGtkStyle è veramente interessante, perché rappresenta il grado più alto dell’integrazione tra Desktop Environment.
Articoli correlati:
Registrare le chiamate di Skype con Scx Tool. Ecco come installarlo su Ubuntu
Neon, installiamo Amarok 2 su Kubuntu e SUSE
Miglioriamo l’aspetto delle applicazioni Wine





complimenti veramente ben fatto ^^
Che palle, solo Qt4…
@Ferdil
No… c’è anche Qt3… installa “qt3-qtconfig”… e poi avvialo… così puoi “rendere” in gtk il look delle applicazioni Qt3.
Mi viene restituito qualche errore al qmake && make:
deviantdark@ubuntu:~/gtkstyle$ qmake && make
qgtkstyle.pro:9: Unknown replace function: qtLibraryTarget
g++ -c -pipe -Wall -W -O2 -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -DQT_PLUGIN -DQT_SHARED -DQT_TABLET_SUPPORT -I/usr/share/qt3/mkspecs/default -I. -I/usr/include/qt3 -o main.o main.cpp
In file included from main.cpp:24:
qgtkstyle.h:27:28: error: QCleanlooksStyle: Nessun file o directory
qgtkstyle.h:28:20: error: QPalette: Nessun file o directory
qgtkstyle.h:29:17: error: QFont: Nessun file o directory
main.cpp:25:30: error: QtGui/QStylePlugin: Nessun file o directory
In file included from main.cpp:24:
qgtkstyle.h:34: error: expected class-name before ‘{’ token
qgtkstyle.h:35: error: ISO C++ forbids declaration of ‘Q_OBJECT’ with no type
qgtkstyle.h:37: error: expected ‘;’ before ‘public’
qgtkstyle.h:40: error: expected `;' before ‘void’
qgtkstyle.h:40: error: ‘QApplication’ has not been declared
qgtkstyle.h:41: error: ‘QPalette’ has not been declared
qgtkstyle.h:42: error: ‘QWidget’ has not been declared
qgtkstyle.h:42: error: ‘void QGtkStyle::polish(int*)’ cannot be overloaded
qgtkstyle.h:40: error: with ‘void QGtkStyle::polish(int*)’
qgtkstyle.h:43: error: ‘QWidget’ has not been declared
qgtkstyle.h:44: error: ‘QApplication’ has not been declared
qgtkstyle.h:44: error: ‘void QGtkStyle::unpolish(int*)’ cannot be overloaded
qgtkstyle.h:43: error: with ‘void QGtkStyle::unpolish(int*)’
qgtkstyle.h:45: error: ‘QPalette’ does not name a type
qgtkstyle.h:46: error: ‘PixelMetric’ has not been declared
qgtkstyle.h:46: error: expected ‘,’ or ‘...’ before ‘*’ token
qgtkstyle.h:47: error: ISO C++ forbids declaration of ‘QStyleOption’ with no type
qgtkstyle.h:48: error: ‘StyleHint’ has not been declared
qgtkstyle.h:48: error: expected ‘,’ or ‘...’ before ‘*’ token
qgtkstyle.h:49: error: ISO C++ forbids declaration of ‘QStyleOption’ with no type
qgtkstyle.h:50: error: ‘PrimitiveElement’ has not been declared
qgtkstyle.h:50: error: expected ‘,’ or ‘...’ before ‘*’ token
qgtkstyle.h:51: error: ISO C++ forbids declaration of ‘QStyleOption’ with no type
qgtkstyle.h:52: error: ‘ControlElement’ has not been declared
qgtkstyle.h:52: error: expected ‘,’ or ‘...’ before ‘*’ token
qgtkstyle.h:53: error: ISO C++ forbids declaration of ‘QStyleOption’ with no type
qgtkstyle.h:54: error: ‘ComplexControl’ has not been declared
qgtkstyle.h:54: error: expected ‘,’ or ‘...’ before ‘*’ token
qgtkstyle.h:55: error: ISO C++ forbids declaration of ‘QStyleOptionComplex’ with no type
qgtkstyle.h:56: error: ‘QRect’ does not name a type
qgtkstyle.h:58: error: ‘QSize’ does not name a type
qgtkstyle.h:60: error: ‘QPixmap’ does not name a type
qgtkstyle.h:64: error: ‘QFont’ does not name a type
qgtkstyle.h:65: error: ISO C++ forbids declaration of ‘QList’ with no type
qgtkstyle.h:65: error: expected ‘;’ before ‘<’ token
main.cpp:28: error: expected class-name before ‘{’ token
main.cpp:31: error: ISO C++ forbids declaration of ‘QStyle’ with no type
main.cpp:31: error: expected ‘;’ before ‘*’ token
main.cpp:32: error: ‘QStringList’ does not name a type
main.cpp:39: error: expected constructor, destructor, or type conversion before ‘*’ token
main.cpp:44: error: ‘QStringList’ does not name a type
main.cpp:49: error: expected constructor, destructor, or type conversion before ‘(’ token
make: *** [main.o] Error 1
deviantdark@ubuntu:~/gtkstyle$
Qualche idea?
@derma: ho fatto come hai detto, ma “gtk” non appare nel menù appearence che c’è in qtconfig (qt3-config). che fare?
Bel post davvero. Lo provo subito.
Ciao!
- Apri un Terminale
- Scrivi “qtconfig-qt3″ (senza virgolette)
- Seleziona la tab “Appearance”
- Nella casella casella Select GUI Style seleziona “Polymer”
- Seleziona Palette
- -Nella finestra che appare, seleziona “background” (nel campo “Central color roles”)
- – - – Imposta i colori così… Rosso (237), Verde (236), Blu (235)
- – Nel campo “3-D shadow effetcts”, seleziona “Select color”
- – - – Imposta i colori così Rosso(78), Verde(118), Blu(168)
- Seleziona la tab “Fonts”
- – nella casella a discesa “Family”, scegli “Sans Serif”
- – nella capo Point Size, scrivi “9″
- seleziona “File” dalla barra dei menu
- – scegli la voce “Save”
- – scegli la voce “Exit”
(Le modifiche sono istantaneee)
That’s all!
Ciao, ho seguito la tua guida, su Skype ha avuto effetto, ma ad esempio Amarok 2, Knotes e le altre applicazioni KDE4 non sono state toccate…
Sono su Ubuntu 8.10.
nessun aiuto? blog abbandonato? :)
X Fra: Hai ragione, scusa,è che mi sono preso un mesetto di pausa. Strano pechè dovrebbe funzionare principalmente con le applicazioni QT4.
:’( a te quindi funziona anche con le applicazioni KDE4?
ho provato a seguire la guida anche per le applicazioni Qt3, ma anche lì quelle KDE3 non le modifica… non capisco…