QtCreator has black widgets

For some reason QtCreator and the applications I build have these widgets with the black background instead of the correct white backgrounds. Screenshots: http://paste.opensuse.org/view/raw/52115248 and http://paste.opensuse.org/view/raw/33763749

I initially noticed this when I installed qtcreator from the repos so I tried it with the download from the qt community site but I still get this issue. Any ideas on what is causing this? I am using the nvidia drivers (“easy way”) but this happens with nouveau too.

I don’t see that here.
Is this the Qt4 or Qt5 version of qt-creator?

Please check your color settings in KDE’s “Configure Desktop” (systemsettings)->“Application Appearance”->Colors. Maybe try to set a different color scheme.
And GUI style have you configured? (look in “qtconfig” and in KDE’s “Configure Desktop” (systemsettings)->“Application Appearance”->Style if the former one is set to “Desktop Settings”)
The Gtk+ Style can cause strange color issues, so change it to something else if that is set.

Try to remove the file ~/.config/Trolltech.conf .

On 05/17/2014 04:16 PM, wolfi323 wrote:
> I don’t see that here.
> Is this the Qt4 or Qt5 version of qt-creator?

Qt 5.2.1 (Qt Creator 3.1.0)

> Please check your color settings in KDE’s “Configure Desktop”
> (systemsettings)->“Application Appearance”->Colors. Maybe try to set a
> different color scheme.
> And GUI style have you configured? (look in “qtconfig” and in KDE’s
> “Configure Desktop” (systemsettings)->“Application Appearance”->Style if
> the former one is set to “Desktop Settings”)
> The Gtk+ Style can cause strange color issues, so change it to something
> else if that is set.

Set KDE color scheme to default, set qtconfig style to oxygen, set gtk2
style to oxygen and gtk3 to default. Issue is still there.

>
> Try to remove the file ~/.config/Trolltech.conf .

Removed it, didnt fix the issue. Any other ideas?

Here is another screenshot, see how its only happening in some widgets?
http://paste.opensuse.org/view/simple/78462513

Well, everything I wrote applied to the Qt4 version.

> Please check your color settings in KDE’s “Configure Desktop”
> (systemsettings)->“Application Appearance”->Colors. Maybe try to set a
> different color scheme.
> And GUI style have you configured? (look in “qtconfig” and in KDE’s
> “Configure Desktop” (systemsettings)->“Application Appearance”->Style if
> the former one is set to “Desktop Settings”)
> The Gtk+ Style can cause strange color issues, so change it to something
> else if that is set.

Set KDE color scheme to default, set qtconfig style to oxygen, set gtk2
style to oxygen and gtk3 to default. Issue is still there.

The GTK2/GTK3 settings apply only to GTK applications obviously.
And changing the KDE4 settings has no influence on Qt5 applications either, only on apps using Qt4.

>
> Try to remove the file ~/.config/Trolltech.conf .

Removed it, didnt fix the issue. Any other ideas?

Of course, again that is the Qt4 configuration.
Qt5 stores the configuration in ~/.config/QtProject/ I think, so try to remove/rename that.

You would need to use KDE5’s systemsettings (which you probably don’t have installed).

Does it work as a new user?

Does it help if you run it like this?

QT_STYLE_OVERRIDE=oxygen qtcreator

Or just install/use the Qt4 version instead. (package qt-creator)

On 05/17/2014 05:36 PM, wolfi323 wrote:
> Or just install/use the Qt4 version instead. (package qt-creator)

Already tried, didnt help with the programs I built.

> Qt5 stores the configuration in ~/.config/QtProject/ I think, so try to
> remove/rename that.

I removed ~/.config/QtProject/QtCreator.conf but it did nothing.

> And changing the KDE4 settings has no influence on Qt5 applications
> either, only on apps using Qt4.

Ah okay, did not know that.

>QT_STYLE_OVERRIDE=oxygen qtcreator

Works for QtCreator but when I build the application it uses the CDE
theme and still has the black areas.

> Does it work as a new user?

Yes it does, I created a new user and built the application and it works
fine. But I still cannot get it to work on my user (tried adding it as a
brand new project but no good).

I thought you only have this problem in qtcreator.
Using the Qt4 version of qtcreator should fix it for qtcreator itself.

The programs you are building still use Qt5 of course, if they are built against Qt5.

> Qt5 stores the configuration in ~/.config/QtProject/ I think, so try to
> remove/rename that.

I removed ~/.config/QtProject/QtCreator.conf but it did nothing.

Try to remove/rename the whole directory ~/.config/QtProject/.
I’m not sure at the moment where Qt5 stores its settings, but it seems to be ~/.config/QtProject.conf, so remove that as well if it is there.

Also try to remove ~/.config/kdeglobals if it exists.

As it is working with a new user, it has to be caused by some user setting.

On 05/17/2014 06:36 PM, wolfi323 wrote:
> Try to remove/rename the whole directory ~/.config/QtProject/.
> I’m not sure at the moment where Qt5 stores its settings, but it seems
> to be ~/.config/QtProject.conf, so remove that as well if it is there.

Removed them, opened qtcreator (for qt4), imported the project, still
get the issue. I just noticed this in the Application Output though.


"Qt Warning - invalid keysym: dead_actute"
libGL error: failed to load driver: swrast
libGL error: Try again with LIBGL_DEBUG=verbose for more details.
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile

As I said before I am using the nvidia drivers that were installed the
easy way so not sure why I get a libGL error. I installed Mesa-demo-x
and glxinfo | grep direct shows direct rendering: yes. hwinfo --gfx card
says nvidia is active.

According to mesa3d.org swrast is the legacy rasterizer so why is it
being used?

> Also try to remove ~/.config/kdeglobals if it exists.

Did not exist on my system.

Output of glxinfo | grep render


$ glxinfo | grep render                                   
direct rendering: Yes
OpenGL renderer string: GeForce GTX 560 Ti/PCIe/SSE2
    GL_NVX_conditional_render, GL_NVX_gpu_memory_info, 
    GL_NV_conditional_render, GL_NV_copy_depth_to_color, GL_NV_copy_image, 
    GL_NV_parameter_buffer_object2, GL_NV_path_rendering, 
    GL_NVX_conditional_render, GL_NVX_gpu_memory_info, 
    GL_NV_conditional_render, GL_NV_copy_depth_to_color, GL_NV_copy_image, 
    GL_NV_parameter_buffer_object2, GL_NV_path_rendering, 


Read this and it gets rid of the first line in the error but I still get (ran form zsh just to debug)


$ ./editor                                          
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile


Sorry for the triple posting, seems qtcreator gives additional output:


Debugging starts
 &"warning: GDB: Failed to set controlling terminal: Inappropriate ioctl for device
"
 Temporarily disabling breakpoints for unloaded shared library "/usr/lib64/libLLVMRuntimeDyld.so"
 libGL error: failed to load driver: swrast
 libGL error: Try again with LIBGL_DEBUG=verbose for more details.
 libpng warning: iCCP: known incorrect sRGB profile
 libpng warning: iCCP: known incorrect sRGB profile
 libpng warning: iCCP: known incorrect sRGB profile
 libpng warning: iCCP: known incorrect sRGB profile


You installed the Qt4 version of qt-creator now?
So it is fixed for qtcreator, but you still have the problems with the applications you build, right?

As I wrote already, this is normal of course. If you build a Qt5 application, it uses Qt5 no matter whether you run it inside Qt4-qtcreator or Qt5-qtcreator.

And you prabably will have the same problem with any other Qt5 application, like assistant-qt5 f.e.

According to mesa3d.org swrast is the legacy rasterizer so why is it
being used?

It isn’t used. The message actually says that the software rasterizer cannot be loaded (probably because you have the nvidia driver installed which breaks Mesa).

That’s just debug output from Qt5 which can be ignored.

> Also try to remove ~/.config/kdeglobals if it exists.

Did not exist on my system.

I thought so, as KDE5 would create that, but I wanted to mention it.

The other two “errors” you got can be ignored as well. You already fixed the first one (it is fixed in Factory as well already).

So which qt-creator are you using now? Qt4 or Qt5? Which package did you install?

Again, it must be some user setting, since it works fine with a new user.
And forcing the style to oxygen with “QT_STYLE_OVERRIDE=oxygen qtcreator” fixed it as well. But I still have no idea where libqt5 would store the style.

> So which qt-creator are you using now? Qt4 or Qt5? Which package did you
> install?
>
> Again, it must be some user setting, since it works fine with a new
> user.

I have Qt4 Creator (2.8.1-2.1.3) from the openSUSE-13.1-Oss repo and Qt5
Creator from the Qt community website download.

> And forcing the style to oxygen with “QT_STYLE_OVERRIDE=oxygen
> qtcreator” fixed it as well.

Only for Qt5 creator, the application when built still has the black
areas and it uses a different theme. Even if I launch the editor from
zsh with QT_STYLE_OVERRIDE=oxygen ./editor the black areas are still
there and the theme is still CDE like.

> But I still have no idea where libqt5 would store the style.

Well then lets keep looking, it must be mentioned somewhere.


Bring the Penguins Back! https://features.opensuse.org/316767
openSUSE 13.1 64 bit
KDE 4.13.0

Just a note: the Qt5 version is available in openSUSE’s repos as well.
The package is called “libqt5-creator”. An older version is included in 13.1’s standard repo, the latest one is available f.e. in the KDE:Qt53 repo along with Qt5.3.

> And forcing the style to oxygen with “QT_STYLE_OVERRIDE=oxygen
> qtcreator” fixed it as well.

Only for Qt5 creator, the application when built still has the black
areas and it uses a different theme. Even if I launch the editor from
zsh with QT_STYLE_OVERRIDE=oxygen ./editor the black areas are still
there and the theme is still CDE like.

Yes, that’s what I wanted to hint at already. If you override the style in that way, it has only effect on qtcreator itself, not on any programs you start inside.
You have to set that environment variable globally to affect all applications, f.e. by adding “QT_STYLE_OVERRIDE=oxygen” to /etc/environment or “export QT_STYLE_OVERRIDE=oxygen” to ~/.bashrc, ~/.profile or ~/.kde4/env/.

I didn’t know you can start the editor separately. There is no program named “editor” on my system (qt-creator as shipped with 13.1, i.e. the Qt4 version).

> But I still have no idea where libqt5 would store the style.

Well then lets keep looking, it must be mentioned somewhere.

Yes. I will tell you when/if I find something.

On 05/18/2014 11:56 AM, wolfi323 wrote:
> I didn’t know you can start the editor separately. There is no program
> named “editor” on my system (qt-creator as shipped with 13.1, i.e. the Qt4
> version).
>

rotfl!

editor is the name of the executable that qtcreator makes when I build
the program. I just ran it directly instead of from qtcreator to see
what would happen. And dont worry I understand what you said earlier
about Qtcreator building Qt5 applications.

>
>> But I still have no idea where libqt5 would store the style.
>
> Well then lets keep looking, it must be mentioned somewhere.
>
> Yes. I will tell you when/if I find something.
>

What about these? I was linked these from someone on the #qt irc channel

https://codereview.qt-project.org/#change,76044
https://codereview.qt-project.org/#change,78014


Bring the Penguins Back! https://features.opensuse.org/316767
openSUSE 13.1 64 bit
KDE 4.13.0

Ah.
So it is a Qt5 application? No idea why that variable has no effect then.

>
>> But I still have no idea where libqt5 would store the style.
>
> Well then lets keep looking, it must be mentioned somewhere.
>
> Yes. I will tell you when/if I find something.
>

What about these? I was linked these from someone on the #qt irc channel

https://codereview.qt-project.org/#change,76044
https://codereview.qt-project.org/#change,78014

At least the first one would look like it could be related.
So try to upgrade Qt5, by adding the KDE:Qt53 repo f.e. and do a full repository vendor change update:
http://en.opensuse.org/SDB:Vendor_change_update#Full_repository_Vendor_change

The Qt53 repo’s URL:
http://download.opensuse.org/repositories/KDE:/Qt53/openSUSE_13.1/

Maybe it helps. Still strange why it would work with a new user. It definitely is dependant on the user’s settings as well.

Yep :slight_smile:

If I run KDE_SESSION_VERSION= ./editor the application works with no black areas.

Hm. Then we would be back to the KDE settings again.
But you said changes there didn’t have any effect. Did you try changing the KDE style? (you only mentioned the Gtk2/3 and qtconfig, i.e. Qt4, styles)

Maybe try to remove the plasma caches as well:

rm /var/tmp/kdecache-$USER/plasma*

(preferrably when plasma-desktop is not running, i.e. call “kquitapp plasma-desktop” first. You can restart it with “plasma-desktop”)

On 05/18/2014 03:56 PM, wolfi323 wrote:

> Hm. Then we would be back to the KDE settings again.
> But you said changes there didn’t have any effect. Did you try changing
> the KDE style? (you only mentioned the Gtk2/3 and qtconfig, i.e. Qt4,
> styles)

Tried changing to CDE but no good.

> Maybe try to remove the plasma caches as well:
>
> Code:
> --------------------
> rm /var/tmp/kdecache-$USER/plasma*
> --------------------
>
> (preferrably when plasma-desktop is not running, i.e. call “kquitapp
> plasma-desktop” first. You can restart it with “plasma-desktop”)

This also did not work. I stopped plasma-desktop as you said but
removing the cache didnt fix it.


Bring the Penguins Back! https://features.opensuse.org/316767
openSUSE 13.1 64 bit
KDE 4.13.0

Anyone else have ideas? I still cant get it to launch properly with the
regular command. Also I noticed that with the “fix” it does not use my
theme but falls back to Plastique or some similar looking style.


openSUSE 13.1 64 bit
KDE 4.13.0
If you found this post helpful, click the star so I can show off my rep
to my friends

Of course. Because it doesn’t detect the KDE session, it doesn’t try to adapt to KDE’s settings but uses its own defaults.

Have you tried to upgrade Qt5 as suggested?
I haven’t seen anything like that on my systems with Qt 5.3.

Does the problem disappear when you rename the ~/.kde4 folder before starting a Qt5 application?

On 05/20/2014 06:36 AM, wolfi323 wrote:

> Have you tried to upgrade Qt5 as suggested?
> I haven’t seen anything like that on my systems with Qt 5.3.

Yes I did it did nothing

> Does the problem disappear when you rename the ~/.kde4 folder before
> starting a Qt5 application?

There we go, I think its fixed now although I lost all my settings
(moving it back doesnt bring them back for some reason). But no issue, I
remember all my settings and have them saved. So we can conclude that it
was something in the kde4 directory, but what? Anyways, thanks wolfi :slight_smile:


openSUSE 13.1 64 bit
KDE 4.13.0
If you found this post helpful, click the star so I can show off my rep
to my friends