Recent

Author Topic: Lazarus in QT?  (Read 13441 times)

running_idiot

  • New Member
  • *
  • Posts: 11
Lazarus in QT?
« on: October 18, 2007, 02:17:11 am »
Hi, I was on this forum while ago, because I was trying to install Lazarus. I did it - and I never used it, because I hate GTK and X11 - and it's not only that I have to run lazarus under X11, but also I would have to force users of my programs to install it and so on.

Well, I was suprised when I found out yesterday that making QT (=Mac OS native) programs is also possible, so I followed this tutorial - and it cost me a lot of nerves - but I finally installed QT and I am able to make something in this framework.

But that's only half of thing - the second thing, which is actually the reason I'm writing this here, is being able to run whole Lazarus in QT - it's apparently possible - http://wiki.lazarus.freepascal.org/Image:macosxqt.png. But when I tried to rebuild the whole thing, not only LCL, after a moment of some magic (= compiling and other stuff I dont understand a bit) it showed me some error message. Because I'm too lazy to rewrite everything, I made a screenshot and put it here:

http://i20.tinypic.com/23rk701.png

I mean, I was so close to this ideal constelation - Lazarus in QT, making OS X native stuff, I compiled whole QT because of it, and then some starnge error. Is it something very serious or can I force it to link and compile somehow?

I just so desperately want Lazarus to work in QT - even more desperately because I know it is possible (according to that wiki image)... can I do something to make it work?

Phil

  • Hero Member
  • *****
  • Posts: 2737
Re: Lazarus in QT?
« Reply #1 on: October 18, 2007, 04:11:13 am »
Quote from: "running_idiot"
I just so desperately want Lazarus to work in QT - even more desperately because I know it is possible (according to that wiki image)... can I do something to make it work?


I assume you built the Laz IDE from the Tools | Configure "Build Lazarus" dialog box. Did you enter the following in the Options box?

-dUSE_QT_4_3 -k'-framework' -k'Qt4Intf' -k'-lobjc'

The -d is need if you're using QT 4.3 since I think the default is 4.2 in the Qt widgetset. The -k items passes this info to the linker so it knows how to satisfy Qt references. Sorry that I haven't updated the Qt Mac instructions but this compiling of the IDE with Qt is pretty leading-edge stuff!

Did you know that you can also compile the Laz IDE natively to the Carbon widgetset? See this recent posting:

http://www.mail-archive.com/lazarus@miraclec.com/msg18825.html

Be sure to use today's Laz snapshot since it has some important improvements to the Carbon widgetset.

I see that Tomas (main developer of Carbon widgetset) also posted an .app bundle today to the Lazarus SVN site, so maybe manually creating the .app bundle as given in my instructions won't be necessary. Haven't had a chance to check it out yet.

Thanks.

-Phil

windy

  • Full Member
  • ***
  • Posts: 186
RE: Re: Lazarus in QT?
« Reply #2 on: October 18, 2007, 07:36:22 pm »
Hi
I have Carbon working with the latest snapshot (17th Oct) and have succesfully created an application bundle for the compiled program and that runs from  a double click in finder...great!, looks great!, 1/3rd the file size too!
thanks to the team working on the carbon widget set !
I just now need to get the compiler IDE running in carbon

i notice though that a page control does not show the scroll left/right..also the TTI calendar component is not supported yet (just putting these things here in case someone who is working on the carbon widget set might read this and add it to their list of things to convert :) )

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: RE: Re: Lazarus in QT?
« Reply #3 on: October 18, 2007, 07:48:39 pm »
Quote from: "windy"
I just now need to get the compiler IDE running in carbon


I wouldn't botter at the moment. Caret isn't implemented so you can't use the code editor.

However, all the rest of the interface is in excelent shape, so you can recompile only LCL for carbon and build applications for it using a Qt or Gtk IDE.

Quote
i notice though that a page control does not show the scroll left/right..


Please report bugs on the bug tracker.

Also attached on the bug report any necessary screenshots / test programs

Paul Ishenin

  • Sr. Member
  • ****
  • Posts: 274
RE: Re: RE: Re: Lazarus in QT?
« Reply #4 on: October 20, 2007, 11:07:34 am »
I've added info about carbon ide bugs to this page:  http://wiki.lazarus.freepascal.org/Carbon_interface_internals

Phil

  • Hero Member
  • *****
  • Posts: 2737
Re: RE: Re: RE: Re: Lazarus in QT?
« Reply #5 on: October 20, 2007, 05:27:34 pm »
Quote from: "PaulIsh"
I've added info about carbon ide bugs to this page:  http://wiki.lazarus.freepascal.org/Carbon_interface_internals


Hi Paul,

SynEdit display of text in Laz code editor is much improved following Tomas' changes to Carbon widgetset on Oct. 17. Or are you referring to something else with "Font metrics"?

Also, my Carbon-based IDE crashes every time I shut it down unless I've clicked the rightmost tab on the component palette so that its component icons are displayed, and then only if I use File | Quit (Lazarus | Quit Lazarus still crashes). Are you seeing this crash too?

Also, the symlink to lazarus executable in lazarus.app is broken in the snapshots. I'll post this on BugTracker.

I'll add to your wiki list if I find other issues.

Thanks.

-Phil

Paul Ishenin

  • Sr. Member
  • ****
  • Posts: 274
RE: Re: RE: Re: RE: Re: Lazarus in QT?
« Reply #6 on: October 20, 2007, 07:21:32 pm »
yes, I also have crashes during closing lazarus.

windy

  • Full Member
  • ***
  • Posts: 186
RE: Re: RE: Re: RE: Re: Lazarus in QT?
« Reply #7 on: October 20, 2007, 09:24:33 pm »
Hi
one thing that would be realy great to improve , for me, with the carbon interface on the Mac is the Tpagecontrol ....the fonts need to be smaller....setting that property does not seem to work, and if possible getting the scroll to work too?
Can I like send a bounty to get that improved?
thanks for all the efforts by the developers so far, good stuff!
Brian

Phil

  • Hero Member
  • *****
  • Posts: 2737
Re: RE: Re: RE: Re: RE: Re: Lazarus in QT?
« Reply #8 on: October 21, 2007, 12:27:16 am »
Quote from: "windy"
Hi
one thing that would be realy great to improve , for me, with the carbon interface on the Mac is the Tpagecontrol ....the fonts need to be smaller....setting that property does not seem to work, and if possible getting the scroll to work too?
Can I like send a bounty to get that improved?
thanks for all the efforts by the developers so far, good stuff!
Brian


Feel free to post a bounty, although I'm not sure if the native Carbon tab control supports either a font size or scrolling. Here's how it's created in the TCarbonTabsControl.CreateWidget:

    CreateTabsControl(GetTopParentWindow, ParamsToCarbonRect(AParams),
      kControlTabSizeLarge, Direction, 0, TabEntry, Control),

You could try using kControlTabSizeSmall or kControlTabSizeMini instead of kControlTabSizeLarge and rebuilding the LCL/Carbon, then see if that changes the size of the tabs or their font.

One problem would be how to specify whether to use Large, Small or Mini since there's no equivalent property in TPageControl. Perhaps the widgetset could make an assumption based on the Height property of the TPageControl's Font and select the tab size accordingly.

Thanks.

-Phil

Paul Ishenin

  • Sr. Member
  • ****
  • Posts: 274
RE: Re: RE: Re: RE: Re: RE: Re: Lazarus in QT?
« Reply #9 on: October 21, 2007, 06:21:02 am »
Without scrollers PageControls with many tabs will be unusable. This problem already visible with some ide dialogs like enviroment options.

windy

  • Full Member
  • ***
  • Posts: 186
RE: Re: RE: Re: RE: Re: RE: Re: Lazarus in QT?
« Reply #10 on: October 21, 2007, 01:24:05 pm »
HI
good idea Phil
but did not seem to work...and I did follow your instructions,...hummmm...has not been my day

Phil

  • Hero Member
  • *****
  • Posts: 2737
Re: RE: Re: RE: Re: RE: Re: RE: Re: Lazarus in QT?
« Reply #11 on: October 21, 2007, 05:02:33 pm »
Quote from: "windy"
HI
good idea Phil
but did not seem to work...and I did follow your instructions,...hummmm...has not been my day


Paul is right - without the ability to scroll tabs or have multiple rows of tabs, eventually you'll run out of room in some circumstances. I thought perhaps changing the tab size might help you in the meantime, but it sounds like it doesn't work. I Googled but didn't immediately see any discussion of those 3 choices for tab size.

Thanks.

-Phil

windy

  • Full Member
  • ***
  • Posts: 186
RE: Re: RE: Re: RE: Re: RE: Re: RE: Re: Lazarus in QT?
« Reply #12 on: October 21, 2007, 08:14:38 pm »
one thing that does work is to abreviate,and or shorten the tab descriptions :)
i have a few setup screens that have alot of tabs....

 

TinyPortal © 2005-2018