View Issue Details

IDProjectCategoryView StatusLast Update
0036543LazarusLCLpublic2020-04-15 11:06
ReporterWitold Posiewała Assigned ToZeljan Rikalo  
Status resolvedResolutionno change required 
Product Version2.0.6 
Summary0036543: No Images in TMenuItem (TMainMenu) qt5
DescriptionThere are no images that were added to the object TMenuItem (, when compiling it to the gtk2 version - all ok.
Steps To ReproduceCreate new application,
add TMainMenu, add MenuItem and add some bitmap to the MenuItem.

Compile and run in gtk2: images appear in the menu.
Compile and run in qt5: no images appear in the menu
TagsNo tags attached.
Fixed in Revision
Attached Files


Zeljan Rikalo

2020-01-10 09:31

developer   ~0120296

Please attach example project.

Witold Posiewała

2020-01-10 19:38

reporter   ~0120312

Thank you for your interest. Sorry, but I can't upload any file - upload is hanging. I've tried many times - even though the example has only 3.8kB. It can be produced as described earlier. New project, add TMainMenu object. Add any MenuItem to it. Add any graphic in MenuItem Bitmap (I tried a small png file). Compile the application into qt5. Below unit1.lfm:

object Form1: TForm1
  Left = 626
  Height = 240
  Top = 170
  Width = 320
  Caption = 'Form1'
  Menu = MainMenu1
  OnCreate = FormCreate
  LCLVersion = ''
  object MainMenu1: TMainMenu
    left = 37
    top = 27
    object MenuItem1: TMenuItem
      Caption = 'MenuItem1'
      Bitmap.Data = {

Witold Posiewała

2020-01-10 19:49

reporter   ~0120313

Sorry, I didn't add. I checked. In a location with the qt5-qtbase-5.13.2-1.fc31.x86_64 library - it's bad. In the location with the library qt5-qtbase-5.12.1-7.fc30.x86_64 is fine.

Juha Manninen

2020-01-11 00:45

developer   ~0120318

> Sorry, but I can't upload any file - upload is hanging.
The file gets uploaded when you click the Add Note button. Yes, I also struggled with it at first. :)

Zeljan Rikalo

2020-01-11 09:47

developer   ~0120321

@Witold, are you saying that bug exist only with Qt5-5.13 ?

Witold Posiewała

2020-01-13 12:43

reporter   ~0120400

Sorry, I was unavailable for 2 days.
Yes, when I use the Qt5-5.12 library it is good. But when I use the latest in Fedora 31 (Qt5-5.13) it's bad.
Thanks @JuhaManninen, I'm uploading an example application :).
example.tgz (3,840 bytes)

Zeljan Rikalo

2020-04-15 11:06

developer   ~0122157

Resolved as no change required. Qt > 5.12 respects current theme (eg under Gnome) so that's why you don't see images in menus (try to enable it globally for you desktop environment).
It's simple to reproduce working icons in menus: ./lazarus -style fusion or ./myapplication -style fusion and you'll see icons in menus ... please close.

Issue History

Date Modified Username Field Change
2020-01-09 22:21 Witold Posiewała New Issue
2020-01-10 09:31 Zeljan Rikalo Assigned To => Zeljan Rikalo
2020-01-10 09:31 Zeljan Rikalo Status new => assigned
2020-01-10 09:31 Zeljan Rikalo Status assigned => feedback
2020-01-10 09:31 Zeljan Rikalo LazTarget => -
2020-01-10 09:31 Zeljan Rikalo Note Added: 0120296
2020-01-10 19:38 Witold Posiewała Note Added: 0120312
2020-01-10 19:38 Witold Posiewała Status feedback => assigned
2020-01-10 19:49 Witold Posiewała Note Added: 0120313
2020-01-11 00:45 Juha Manninen Note Added: 0120318
2020-01-11 09:47 Zeljan Rikalo Note Added: 0120321
2020-01-13 12:43 Witold Posiewała File Added: example.tgz
2020-01-13 12:43 Witold Posiewała Note Added: 0120400
2020-04-15 11:06 Zeljan Rikalo Status assigned => resolved
2020-04-15 11:06 Zeljan Rikalo Resolution open => no change required
2020-04-15 11:06 Zeljan Rikalo Widgetset QT5 => QT5
2020-04-15 11:06 Zeljan Rikalo Note Added: 0122157