* * *

Author Topic: QT on windows?  (Read 1450 times)

snorkel

  • Sr. Member
  • ****
  • Posts: 274
QT on windows?
« on: September 11, 2012, 07:59:42 pm »
Hi,
Can I use QT on windows instead of the win32 widget set?
If so do I have to rebuild the IDE?

I am only thinking about this as I need a page control that can have close buttons on the tabs.
and from what I can see the QT widgetset allows this.

Thanks,

Snorkel
***Snorkel***
If I forget, I always use the latest stable 32bit version of Lazarus and FPC. At the time of this signature that is Laz 1.0.8 and FPC 2.6.2
OS: Windows 7 64 bit and ArchLinux with KDE 4.10

Dibo

  • Hero Member
  • *****
  • Posts: 940
Re: QT on windows?
« Reply #1 on: September 11, 2012, 09:17:41 pm »
Yes you can. I tried this long time ago. But notice, to build (and run) that application, you need provide some main QT libs with your application.
If you need close button only, maybe try Lazarus Custom Drawn Controls (http://wiki.freepascal.org/Lazarus_Custom_Drawn_Controls) ? You can mix it with standard component library (e.g adding only page control) Default style looks like from win 95 epoch, but there is windows xp style too, or you can just drawn own fancy tabs :)

chris_c

  • Jr. Member
  • **
  • Posts: 84
Re: QT on windows?
« Reply #2 on: September 12, 2012, 11:32:00 am »
on a side note one thing that impressed me was running ldd on a lazarus generated app, sure it uses a whole bunch of libs but its about the same profile of library use as any other "normal" gtk application, what I was expecting was a separate library linkage for every component type that was used. I seem to remember Delphi (years ago - no idea what its like now) needing a whole bunch of DLL's depending on how many different component you used (not pretty)
64bit Ubuntu 12.04, Lazarus v1.1-20120923, FPC v2.6.0

Leledumbo

  • Hero Member
  • *****
  • Posts: 4307
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: QT on windows?
« Reply #3 on: September 12, 2012, 05:02:24 pm »
Quote
Can I use QT on windows instead of the win32 widget set?
Yes.
Quote
If so do I have to rebuild the IDE?
No, only LCL need to be rebuilt (should be automatic when you change LCLWidgetType macro).

Note that you need Qt4Pas dll for this to work.

zeljko

  • Sr. Member
  • ****
  • Posts: 349
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: QT on windows?
« Reply #4 on: September 14, 2012, 08:55:26 pm »
Quote
Can I use QT on windows instead of the win32 widget set?
Yes.
Quote
If so do I have to rebuild the IDE?
No, only LCL need to be rebuilt (should be automatic when you change LCLWidgetType macro).

Note that you need Qt4Pas dll for this to work.

But also he needs other Qt dll's which can be downloaded from qt.nokia.com

Dibo

  • Hero Member
  • *****
  • Posts: 940
Re: QT on windows?
« Reply #5 on: September 14, 2012, 09:52:01 pm »
Hmm. Generally, I never considered topic author solution but it seems interesting alternative for fpGUI or Custom Drawn Controls. For UI-crossplatform I always used solution: windows -> winapi widgetset, gnome -> gtk widgetset, kde -> qt widgetset. But using only QT on all OS sounds interesting. QT hello world in lazarus seems to need only basic QT libs to run. The only weakness are:
1. Size of deployed executable, but what it matter today
2. Performance (but what I read for example, GTK wrapper for lazarus is much slower than QT, because lazarus GTK is old and must be rewritten)

What we get:
1. Power of QT controls (but I don't know yet what libQT4Pas can do)
2. One look on all platforms
3. We can include webkit

Anyone tested this solution?

Leledumbo

  • Hero Member
  • *****
  • Posts: 4307
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: QT on windows?
« Reply #6 on: September 15, 2012, 05:14:14 am »
Quote
Anyone tested this solution?
Yes, under Windows, all other toolkits but native win32/64 are slower. I guess this is because they need some kind of startup. The requirement of additional runtime libraries is also not really acceptable IMHO. They tend to use bigger memory as well. Under Linux with KDE, QT wins over GTK(2), especially in speed. Memory differs a little where GTK(2) wins.

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads