View Issue Details

IDProjectCategoryView StatusLast Update
0033295LazarusLCLpublic2019-02-26 19:57
ReporterVojtech CihakAssigned ToZeljan Rikalo 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Platformamd64OSLinuxOS VersionChakra 64-bit
Product Version1.9 (SVN)Product Build57426 
Target VersionFixed in Version 
Summary0033295: Combo in csOwnerDrawEditable
DescriptionComboBox in csOwnerDrawEditableFixed and csOwnerDrawEditableVariable does not display any text at design-time. Text is displayed correctly at run-time.

I guess there is no need to override DrawItem method for edit line in these styles.
Steps To ReproduceOpen demo project. Set any Text property or ItemIndex to 0, 1 or 2. Edit line of ComboBox is empty.
Run project - text will appear.
Additional InformationLazarus 1.9.0 r57426M FPC 3.1.1 x86_64-linux-qt
TagsNo tags attached.
Fixed in Revision59773
LazTarget-
WidgetsetQT, QT5
Attached Files
  • ComboEditable.zip (2,020 bytes)
  • issue33295.diff (538 bytes)
    Index: lcl/interfaces/qt/qtwidgets.pas
    ===================================================================
    --- lcl/interfaces/qt/qtwidgets.pas	(revision 59757)
    +++ lcl/interfaces/qt/qtwidgets.pas	(working copy)
    @@ -9784,6 +9784,8 @@
       begin
         Result := TQtComboBox(LCLObject.Handle).InUpdate or
           (csDesigning in LCLObject.ComponentState);
    +    if (QEvent_type(Event) = QEventPaint) and (csDesigning in LCLObject.ComponentState) then
    +      QObject_event(Sender, Event);
         if Result then
           QEvent_ignore(Event)
         else
    
    issue33295.diff (538 bytes)

Activities

Vojtech Cihak

2018-03-02 02:10

reporter  

ComboEditable.zip (2,020 bytes)

Vojtech Cihak

2018-03-02 02:22

reporter   ~0106811

This seems to be Qt issue (and all Styles).

I tried with Lazarus 1.8.0 r56594 FPC 3.0.4 i386-win32-win32/win64 and it displays text at design-time for all styles except csDropDownList.

Zeljan Rikalo

2018-12-09 10:01

developer  

issue33295.diff (538 bytes)
Index: lcl/interfaces/qt/qtwidgets.pas
===================================================================
--- lcl/interfaces/qt/qtwidgets.pas	(revision 59757)
+++ lcl/interfaces/qt/qtwidgets.pas	(working copy)
@@ -9784,6 +9784,8 @@
   begin
     Result := TQtComboBox(LCLObject.Handle).InUpdate or
       (csDesigning in LCLObject.ComponentState);
+    if (QEvent_type(Event) = QEventPaint) and (csDesigning in LCLObject.ComponentState) then
+      QObject_event(Sender, Event);
     if Result then
       QEvent_ignore(Event)
     else
issue33295.diff (538 bytes)

Zeljan Rikalo

2018-12-09 10:02

developer   ~0112459

Please test with attached patch and give some feedback, so if it's ok, it'll be commited to RC3 too.

Zeljan Rikalo

2018-12-10 10:59

developer   ~0112475

Please test and close if ok.

Vojtech Cihak

2019-02-26 19:57

reporter   ~0114470

Works. Thanks.

Issue History

Date Modified Username Field Change
2018-03-02 02:10 Vojtech Cihak New Issue
2018-03-02 02:10 Vojtech Cihak File Added: ComboEditable.zip
2018-03-02 02:22 Vojtech Cihak Note Added: 0106811
2018-09-11 14:36 Juha Manninen Assigned To => Zeljan Rikalo
2018-09-11 14:36 Juha Manninen Status new => assigned
2018-12-09 10:01 Zeljan Rikalo File Added: issue33295.diff
2018-12-09 10:02 Zeljan Rikalo LazTarget => -
2018-12-09 10:02 Zeljan Rikalo Note Added: 0112459
2018-12-09 10:02 Zeljan Rikalo Status assigned => feedback
2018-12-10 10:59 Zeljan Rikalo Fixed in Revision => 59773
2018-12-10 10:59 Zeljan Rikalo Widgetset QT => QT, QT5
2018-12-10 10:59 Zeljan Rikalo Note Added: 0112475
2018-12-10 10:59 Zeljan Rikalo Status feedback => resolved
2018-12-10 10:59 Zeljan Rikalo Resolution open => fixed
2019-02-26 19:57 Vojtech Cihak Note Added: 0114470
2019-02-26 19:57 Vojtech Cihak Status resolved => closed