Recent

Author Topic: TPopupMenu and TMainMenu icons not show in QT :(  (Read 10636 times)

ojZim

  • New Member
  • *
  • Posts: 14
TPopupMenu and TMainMenu icons not show in QT :(
« 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.
« Last Edit: July 20, 2013, 11:23:20 am by ojZim »

zeljko

  • Hero Member
  • *****
  • Posts: 1596
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: TPopupMenu and TMainMenu icons not show in QT :(
« Reply #1 on: July 20, 2013, 10:09:43 am »
It depends on qt/kde/gnome settings I guess. What desktop environment do you use ?

ojZim

  • New Member
  • *
  • Posts: 14
Re: TPopupMenu and TMainMenu icons not show in QT :(
« Reply #2 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 :)

Leledumbo

  • Hero Member
  • *****
  • Posts: 8757
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: TPopupMenu and TMainMenu icons not show in QT :(
« Reply #3 on: July 20, 2013, 01:28:45 pm »
My Lazarus Qt package menu, using Kubuntu (KDE).

zeljko

  • Hero Member
  • *****
  • Posts: 1596
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: TPopupMenu and TMainMenu icons not show in QT :(
« Reply #4 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).

Rails

  • Guest
Re: TPopupMenu and TMainMenu icons not show in QT :(
« Reply #5 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.

zeljko

  • Hero Member
  • *****
  • Posts: 1596
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: TPopupMenu and TMainMenu icons not show in QT :(
« Reply #6 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

ojZim

  • New Member
  • *
  • Posts: 14
Re: TPopupMenu and TMainMenu icons not show in QT :(
« Reply #7 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 :)

Leledumbo

  • Hero Member
  • *****
  • Posts: 8757
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: TPopupMenu and TMainMenu icons not show in QT :(
« Reply #8 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.

ojZim

  • New Member
  • *
  • Posts: 14
Re: TPopupMenu and TMainMenu icons not show in QT :(
« Reply #9 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?

Leledumbo

  • Hero Member
  • *****
  • Posts: 8757
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: TPopupMenu and TMainMenu icons not show in QT :(
« Reply #10 on: July 21, 2013, 05:59:21 am »
The attached project should have icon in new item 2 when new item 1 is expanded

ojZim

  • New Member
  • *
  • Posts: 14
Re: TPopupMenu and TMainMenu icons not show in QT :(
« Reply #11 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.

Blaazen

  • Hero Member
  • *****
  • Posts: 3237
  • POKE 54296,15
    • Eye-Candy Controls
Re: TPopupMenu and TMainMenu icons not show in QT :(
« Reply #12 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.
Lazarus 2.3.0 (rev main-2_3-2863...) FPC 3.3.1 x86_64-linux-qt Chakra, Qt 4.8.7/5.13.2, Plasma 5.17.3
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.21

Try Eye-Candy Controls: https://sourceforge.net/projects/eccontrols/files/

ojZim

  • New Member
  • *
  • Posts: 14
Re: TPopupMenu and TMainMenu icons not show in QT :(
« Reply #13 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?

Blaazen

  • Hero Member
  • *****
  • Posts: 3237
  • POKE 54296,15
    • Eye-Candy Controls
Re: TPopupMenu and TMainMenu icons not show in QT :(
« Reply #14 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.
Lazarus 2.3.0 (rev main-2_3-2863...) FPC 3.3.1 x86_64-linux-qt Chakra, Qt 4.8.7/5.13.2, Plasma 5.17.3
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.21

Try Eye-Candy Controls: https://sourceforge.net/projects/eccontrols/files/

 

TinyPortal © 2005-2018