Page 1 of 1

Qt4 file dialogs not rendering correctly

Posted: 31.01.2010, 14:49
by ajtribick
Hello,

I am having problems with the qt4 version: the open and save file dialogs are not being rendered correctly. This appears to be Celestia-specific and not a problem with the installation of qt4, as the following quick test program renders the save file dialog correctly...

Code: Select all

#include <QtGui>

int main(int argc, char *argv[])
{
    QApplication app(argc, argv);
    QString filename = QFileDialog::getSaveFileName(0, "Get save file name", "/home", "Images (*.png *.jpg)");
    QLabel label(filename);
    label.show();
    return app.exec();
}

In Celestia, no controls are rendered in the Grab Image dialog, and only a small portion of the Open Script dialog is rendered (clicking on a control in this dialog box does cause the rest of the window to render - this fix doesn't work in the Grab Image dialog box because no controls are rendered to click), see attached screenshots.

Building on Xubuntu 9.10 (Karmic) using gcc 4.4.1

Re: Qt4 file dialogs not rendering correctly

Posted: 31.01.2010, 15:13
by t00fri
Andrew,


just running on Windows XP: I guess you will have to restrict your problem with the open/save dialogs to Linux, since under Windows XP/SP3 and Qt= 4.5.2, everything looks fine for the latest SVN version.

Later, after returning to Linux, I'll check it with my openSuSE 10.3 installation.

Fridger

Re: Qt4 file dialogs not rendering correctly

Posted: 31.01.2010, 17:08
by ajtribick
Should have put some more details in previous post: I'm compiling on AMD64, Qt version is 4.5.3.

Re: Qt4 file dialogs not rendering correctly

Posted: 31.01.2010, 18:46
by t00fri
Andrew,

just checked my latest SVN version, built under Qt4-4.3.1 (openSuSE 10.3).

Everything looks perfectly fine also under my Linux installation.

One frequent problem with Qt-installations under Linux is a potential version/header mixup due to incorrect PATH settings.

Fridger

Re: Qt4 file dialogs not rendering correctly

Posted: 31.01.2010, 20:01
by ajtribick
Ah found the problem.

Apparently the GTK+ theme for qt4 does not play nice with the static QFileDialog methods. Annoying.

Re: Qt4 file dialogs not rendering correctly

Posted: 31.01.2010, 21:51
by t00fri
ajtribick wrote:Ah found the problem.

Apparently the GTK+ theme for qt4 does not play nice with the static QFileDialog methods. Annoying.

That's what I was thinking, too, after I saw that small part of the file selector dialog which was GTK-type. Remember that Steve C. had plenty of GTK trouble with file selectors some time ago in Celestia?

Fridger

Re: Qt4 file dialogs not rendering correctly

Posted: 04.02.2010, 22:10
by cartrite
t00fri wrote:
ajtribick wrote:Ah found the problem.

Apparently the GTK+ theme for qt4 does not play nice with the static QFileDialog methods. Annoying.

That's what I was thinking, too, after I saw that small part of the file selector dialog which was GTK-type. Remember that Steve C. had plenty of GTK trouble with file selectors some time ago in Celestia?

Fridger
Did you mean Steve P.? I never did get GTK to work correctly. Doesn't surprise me that it is causing other problems too.

By the way, sorry for the long absence. I was able to hold on to building for a while by downloading svn files to a usb stick from a library computer but my AMD64 finally broke down completely. I can't even get it to run for 5 minutes without freezing up. So I don't even use it anymore. I'm starting a new job soon and maybe I'll get back into this soon.
cartrite

Re: Qt4 file dialogs not rendering correctly

Posted: 04.02.2010, 23:44
by t00fri
cartrite wrote:
t00fri wrote:
ajtribick wrote:Ah found the problem.

Apparently the GTK+ theme for qt4 does not play nice with the static QFileDialog methods. Annoying.

That's what I was thinking, too, after I saw that small part of the file selector dialog which was GTK-type. Remember that Steve C. had plenty of GTK trouble with file selectors some time ago in Celestia?

Fridger
Did you mean Steve P.? I never did get GTK to work correctly. Doesn't surprise me that it is causing other problems too.

By the way, sorry for the long absence. I was able to hold on to building for a while by downloading svn files to a usb stick from a library computer but my AMD64 finally broke down completely. I can't even get it to run for 5 minutes without freezing up. So I don't even use it anymore. I'm starting a new job soon and maybe I'll get back into this soon.
cartrite

Hey Steve,

great to hear from you again...and the news sound very good!

Well Steve C. was a mix of Steve and Cartrite ;-) . Of course I meant YOU.

Fridger