User:Zeljan

This is my page ? ;) Hi I'm Zeljan Rikalo (everybody calls me Zeljko), currently developing and maintaning qt4/qt5 interfaces for lazarus. Any feedback about qt-lcl/qt5-lcl from linux,win32 or mac is welcome (patches also). All about Qt interface you can find at

NEWS (dd.MM.yyyy)

Fixed many bugs & regressions.
It looks much better than 4.3.XX - no flickering, faster, fixed some ugly QPainter bugs, fixed event queue bug 
(now I reverted QEventFocusIn & QEventFocusOut into my local svn copy (svn r. 14361)). 
Lazarus IDE feels much better with 4.4.X than with 4.3.X.
There's no special changes for 4.4, only r.14361 is out of game.
Fixes for QCoreApplication events, QComboBox crash fixed ...
QPainter supports justified text in overloaded QPainter::drawText() 
Fixes for QMainWindow, QMdiArea, QMdiSubWindow.
Fixes QPixmap bug with scaling & shifting by half a pixel.
Fixes for QFileDialog, QListView, QTreeView etc ....
Looks like a nice update.

My TODO list

Current status: Trivial MDI Emulator works fine on all widgetsets I can test: gtk2, carbon, win32, qt.

Working features:

Missing features to implement:

Later:

Screenshoots:

KNOWN BUGS IN QT-4.5.3 - (visible in LCLQt)

  1. Plastique,Cleanlooks style - combobox, checkbox doesn't show focus rect when focused by pressing ENTER and SelectNext(ActiveControl, True, True) from another control (TAB KEY WORKS OK) - have patch for Qt. fixed as of qt-4.6.0
  2. WindowsXP style - checkbox doesn't show focus rect for same reason as Plastique checkbox. - have patch for Qt.
  3. QStatusBar - size grip & last item isn't visible (if we have few items) if our main window started as wsMaximized. Issue submitted to Qt <http://bugreports.qt.nokia.com/browse/QTBUG-4334> fixed with qt >= 4.6.2.

TODO FOR NEXT QT BINDINGS RELEASE - BASED ON MINIMUM Qt-4.6 (reminder for Den Jean)

Painting of qt controls with HasPaint=FALSE inside qtlcl

That says that qt will not paint that control (event filter resulted with True result).This works as expected, but not sure about impact on qt or bindings when setting result to true in such way - must test it.

and add Result := Msg.Result <> 0; after you process paint event.

function TQtLineEdit.EventFilter(Sender: QObjectH; Event: QEventH): Boolean; cdecl;
begin
  Result := False;
  if LCLObject = nil then
    exit;
  // TQtLineEdit have HasPaint := False, so only qt draws it
  // but we can do whatever here
  if (QEvent_type(Event) = QEventPaint) then
  begin
    BeginEventProcessing;
    // eg. this makes default qt paint of our control
    // after this call we can do something more inside our SlotPaint
    // and set result to true.
    // As a result we have native control on screen with eg.small red triangle in
    // controls corner which we painted after control was painted by qt.
    // If we don't set Result to true in this case, our control will be
    // repainted by qt again ,and we wan't see small red triangle in corner
    // of our control.
    // if SomeFlagOnOurControl then
    // begin
    //   QObject_event(Widget, Event);
    //   SlotPaint(Sender, Event)
    //   Result := True;
    // end else
    // begin
    // In this case: if result of SlotPaint is false - qt draws control, otherwise
    // we already done that.
    Result := SlotPaint(Sender, Event);
    QEvent_setAccepted(Event, not Result);
    EndEventProcessing;
    // end
  end else
    Result:=inherited EventFilter(Sender, Event);
end;

Real form bounds under X11

size of widget without any decorations on all platforms. QWidget::frameSize() is size of decorated window.

Testing needs lazarus trunk r >= 51853 and -dQtUseAccurateFrame.

Status