Hello,
my system:
OS: modified OpenSuse 11.2, KDE 4.6.3, Qt 4.7.3, Xorg 1.9.3, Celestia trunk 5166, libPNG12 and libPNG14 (tried both)
HW: CPU Intel E7500, 8GB ram, Nvidia Geoforce 9400 GT
If I select the timetoolbar, I can't see the Icons. only the tooltips are displayed.
If I change the icon path in qttimetoolbar.cpp to an absolute path, it works (but I have to install the icons somewhere).
So far I can see, the icons should be loaded from a compiled-in resource.
Maybe Linux doesn't support compiled-in resources or is some extra initialization needed?
Regards,
refsteff
Qt4 GUI: timetoolbar is invisible on OpenSuse fixed
Qt4 GUI: timetoolbar is invisible on OpenSuse fixed
Last edited by refsteff on 21.08.2011, 14:39, edited 1 time in total.
Specs: OpenSUSE 11.2 (modified), nVidia Geforce 9400 GT, Intel E7500, celestia svn 5166 Qt4
Re: Qt4 GUI: timetoolbar is invisible on OpenSuse
refsteff wrote:Maybe Linux doesn't support compiled-in resources or is some extra initialization needed?
Indeed I need some extra initialization and because I use the autoconf tools to build celestia, there is also a little change in the build system necessary.
Code: Select all
diff -urN celestia.org/src/celestia/qt/Makefile.am celestia/src/celestia/qt/Makefile.am
--- celestia.org/src/celestia/qt/Makefile.am 2011-08-19 16:04:59.000000000 +0200
+++ celestia/src/celestia/qt/Makefile.am 2011-08-21 15:30:54.388752873 +0200
@@ -99,4 +99,4 @@
$(MOC) $< -o $@
qrc_%.cpp: %.qrc
- $(RCC) $< -o $@
+ $(RCC) -name $(patsubst %.qrc,%,$<) $< -o $@
This does the whole thing:
Code: Select all
diff -urN celestia.org/src/celestia/qt/qtmain.cpp celestia/src/celestia/qt/qtmain.cpp
--- celestia.org/src/celestia/qt/qtmain.cpp 2011-08-21 15:28:32.000000000 +0200
+++ celestia/src/celestia/qt/qtmain.cpp 2011-08-21 15:32:30.445753651 +0200
@@ -47,6 +47,10 @@
{
QApplication app(argc, argv);
+#ifdef __linux
+ Q_INIT_RESOURCE(icons);
+#endif
+
QCoreApplication::setOrganizationName("Celestia Development Team");
QCoreApplication::setApplicationName("Celestia");
After this I can see the timetoolbar
The enclosing "#ifdef __linux " is only for the developers sake, I don't know if it is necessary.
Specs: OpenSUSE 11.2 (modified), nVidia Geforce 9400 GT, Intel E7500, celestia svn 5166 Qt4
- John Van Vliet
- Posts: 2944
- Joined: 28.08.2002
- With us: 22 years 2 months
Re: Qt4 GUI: timetoolbar is invisible on OpenSuse fixed
--- edit ---
Last edited by John Van Vliet on 19.10.2013, 07:09, edited 1 time in total.
Re: Qt4 GUI: timetoolbar is invisible on OpenSuse fixed
Ah great, I was also having this issue on Ubuntu, this fixes it.
Any Mac users seeing this? (From what I remember this does not affect Windows, but I might be mistaken there)
Any Mac users seeing this? (From what I remember this does not affect Windows, but I might be mistaken there)
Re: Qt4 GUI: timetoolbar is invisible on OpenSuse fixed
Also working on Windows using qt creator, with or without the #ifdef.
Re: Qt4 GUI: timetoolbar is invisible on OpenSuse fixed
Nice. But I have to say, these icons(resources) should automatically loaded. If they didn't the build system missed something.
- John Van Vliet
- Posts: 2944
- Joined: 28.08.2002
- With us: 22 years 2 months