Lazarus

Programming => Widgetset => QT => Topic started by: ojZim on July 20, 2013, 10:08:21 am

Title: TPopupMenu and TMainMenu icons not show in QT :(
Post by: ojZim on July 20, 2013, 10:08:21 am
Hello to all fpc friends  ;)
When I'm using QT for my project, the icon of MenuItems not work.
I try this way to use icons:

1. Open Lazarus IDE and create new project.
2. Drag to it a TMainMenu.
3. Double click on TMainMenu and modify items. create submenu and change Bitmap of them. select a icon for them.
4. Comple & Run project. I don't see any icon in menu :(


I'm running ArchLinux 64 bits. I'm using lazarus-qt.
Thank you. I'm waiting for your answers.
Title: Re: TPopupMenu and TMainMenu icons not show in QT :(
Post by: zeljko on July 20, 2013, 10:09:43 am
It depends on qt/kde/gnome settings I guess. What desktop environment do you use ?
Title: Re: TPopupMenu and TMainMenu icons not show in QT :(
Post by: ojZim on July 20, 2013, 10:22:12 am
It depends on qt/kde/gnome settings I guess. What desktop environment do you use ?
I'm using lxde.
I usually use some QT applications on my desktop. They are haven't problem. Look like vlc. It's using qt4 and show icons without any problem :)
Title: Re: TPopupMenu and TMainMenu icons not show in QT :(
Post by: Leledumbo on July 20, 2013, 01:28:45 pm
My Lazarus Qt package menu, using Kubuntu (KDE).
Title: Re: TPopupMenu and TMainMenu icons not show in QT :(
Post by: zeljko on July 20, 2013, 03:56:27 pm
It depends on qt/kde/gnome settings I guess. What desktop environment do you use ?
I'm using lxde.
I usually use some QT applications on my desktop. They are haven't problem. Look like vlc. It's using qt4 and show icons without any problem :)

You can probably fix it with qt4-config tool, or set your TApplication to always shows icons (cannot remember prop name).
Title: Re: TPopupMenu and TMainMenu icons not show in QT :(
Post by: Rails on July 20, 2013, 04:05:47 pm
My QT application does not fully display properly unless I set the QT Configuration tool to Windows gui style. Without that, the QT status bar bevels would disappear. None of my non Lazarus QT applications had any problems. I use XFCE4, so I had to download and install the QT Configuration package. I think KDE might have it built in.

I think I also had to play with the Tune Palette control as well, but I don't remember exactly. I do remember that none of the other QT gui styles available to me worked. I tried them all.
Title: Re: TPopupMenu and TMainMenu icons not show in QT :(
Post by: zeljko on July 20, 2013, 06:20:45 pm
-style gtk
-style cleanlooks
both looks into gtrc settings and if icons for gtk2 are disabled then it won't work
-style windows
-style plastique
both should work without problems
-style motif
-style cde
both are ugly ;)
-style oxygen
should be used only if you have kde + oxygen installed
Title: Re: TPopupMenu and TMainMenu icons not show in QT :(
Post by: ojZim on July 20, 2013, 07:57:56 pm
My Lazarus Qt package menu, using Kubuntu (KDE).
No no no, I see all icons on my Lazarus-Qt menus. I haven't problem. but when I create project and project have icon, the icon does not display in my project :)
I can see icons on other Qt apps like vlc, lazarus-qt, but my created project does not display icon ;)

This problem, only on my project created using Lazarus! All QT Apps on my system working carefully. only my projects created using lazarus does not display icons :)
Title: Re: TPopupMenu and TMainMenu icons not show in QT :(
Post by: Leledumbo on July 21, 2013, 12:26:56 am
Quote
No no no, I see all icons on my Lazarus-Qt menus. I haven't problem. but when I create project and project have icon, the icon does not display in my project :)
Lazarus is written in itself, so if you use Qt interface for Lazarus, then it's a Lazarus application as well. Perhaps you're using icon dimension that's not supported? Try using icons from Lazarus folder.
Title: Re: TPopupMenu and TMainMenu icons not show in QT :(
Post by: ojZim on July 21, 2013, 12:48:23 am
Quote
No no no, I see all icons on my Lazarus-Qt menus. I haven't problem. but when I create project and project have icon, the icon does not display in my project :)
Lazarus is written in itself, so if you use Qt interface for Lazarus, then it's a Lazarus application as well. Perhaps you're using icon dimension that's not supported? Try using icons from Lazarus folder.
I tried to use icons from lazarus images folder. It's not worked  :'(  :'(
Yes, I'm using Qt interface for Lazarus.
I tested icon on gtk, It's working and not problem. but on Qt not works :(
I think I'm wrong on adding icon to my MenuItem.
Who can send me an example source code for that?
Title: Re: TPopupMenu and TMainMenu icons not show in QT :(
Post by: Leledumbo on July 21, 2013, 05:59:21 am
The attached project should have icon in new item 2 when new item 1 is expanded
Title: Re: TPopupMenu and TMainMenu icons not show in QT :(
Post by: ojZim on July 21, 2013, 12:35:34 pm
The attached project should have icon in new item 2 when new item 1 is expanded
i downloaded this, The icons not display on your project too   %)
I think it's a bug on LCL. :D
You can compile project on Qt interface and see it's not display icons. I tested on other machines. It's not display. It's a bug.

Who can test this project on Lazarus and compile it as QT? I want to sure it's a bug and then report.
Title: Re: TPopupMenu and TMainMenu icons not show in QT :(
Post by: Blaazen on July 21, 2013, 12:52:59 pm
Quote
The attached project should have icon in new item 2 when new item 1 is expanded
I can't see it.
But I had good experience with ImageLists + ImageIndex. I always worked well.
Title: Re: TPopupMenu and TMainMenu icons not show in QT :(
Post by: ojZim on July 21, 2013, 01:07:21 pm
Quote
The attached project should have icon in new item 2 when new item 1 is expanded
I can't see it.
But I had good experience with ImageLists + ImageIndex. I always worked well.
Thanks. Yes, It's worked using ImageList  :o
So, What do you think? Is it a bug? Do I need to report it?
Title: Re: TPopupMenu and TMainMenu icons not show in QT :(
Post by: Blaazen on July 21, 2013, 01:28:53 pm
I treid to assign smaller glyph (16x16) and it didn't work either. It works well with GTK2 (both sizes). I tried GlyphShowMode to gsmAlways, no change. I don't see nothing special in QtConfig. You can try to report it, attach there Leledumbo's demo.
Title: Re: TPopupMenu and TMainMenu icons not show in QT :(
Post by: ojZim on July 21, 2013, 01:39:41 pm
OK, I have reported it  ;D
http://bugs.freepascal.org/view.php?id=24770
Title: Re: TPopupMenu and TMainMenu icons not show in QT :(
Post by: Leledumbo on July 21, 2013, 04:03:26 pm
Hmm... since it works on mine, perhaps it's an old bug? Whatever, let's see replies in the bugtracker.
TinyPortal © 2005-2018