March 25, 2011

squiggly101 squiggly101
Lab Rat
5 posts

GUI looks bad on Solaris10

 

Hi

I have built Qt 4.7.2 on Solaris 10, and loaded a simple PyQt app with uic and a GUI made in Qt Creator.

The app and GUI loads fine – however the appearance is pretty bad – fonts are rendered poorly and hard to read, everything is a uniform dull grey color, and widgets are shaped very plainly.

I can use qtconfig to choose different styles – such as Plastique – and while it improves the shape of the widgets (smoother edges etc), the fonts and overall color remain bad. Choosing different fonts through qtconfig don’t really change much – monospace probably looks the best but still relatively poor.

What am I doing wrong?

I built Qt fairly restricted with no multimedia, no phonon, but did link against glib, fontconfig and enabled gtkstyles.

Cheers

5 replies

March 25, 2011

dword dword
Lab Rat
22 posts

Just curious, which mkspec did you use? solaris-cc or solaris-g++?

March 25, 2011

squiggly101 squiggly101
Lab Rat
5 posts

solaris-cc-64

April 1, 2011

SunTzuTech SunTzuTech
Lab Rat
1 posts

Yeah, the default stuff for Solaris 10 is hideously out of date. For the KDE4 Solaris project, we end up building a lot of newer version so it looks better. We also use apache stdcxx in our builds as opposed to stl4. Take a look at http://techbase.kde.org/Projects/KDE_on_Solaris.

April 1, 2011

squiggly101 squiggly101
Lab Rat
5 posts

It turns out I was able to apply themes and fonts using the following code:

  1. app.setPalette( app.setStyle( "Plastique" ).standardPalette( ) )
  2. app.setFont( QtGui.QFont("Terminal",12))

This makes the overall GUI look much better, and basically usable, however fonts are still pretty bad.

May 13, 2011

Randall Randall
Lab Rat
6 posts

I just had this same problem with font ugliness on Solaris 10. I fixed it by updating to FreeType 2.2.4 [sourceforge.net] and FontConfig 2.8.0 [cgit.freedesktop.org]. once you install these libraries (for some reason the old existing versions I had wouldn’t work with Qt4), you can add the following lines to your ~/.Xdefaults configuration file If you have one:

  1. ! Xft font settings -----------------------------------------------------------
  2.  
  3. Xft.dpi:           96
  4. Xft.autohint:      false
  5. Xft.antialias:     true
  6. Xft.rgba:          rgb
  7. Xft.lcdfilter:     lcddefault
  8. Xft.hinting:       true
  9. Xft.hintstyle:     hintslight

After these changes, Qt fonts look just as good as an out of the box Linux/KDE version would. Good luck!

 
  ‹‹ Unclear about configure options.      How to compile Qt 4.7.2 with VS 2010 64-bit on Win7 64-bit ››

You must log in to post a reply. Not a member yet? Register here!