Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / qt / 2007-01

Qt progress

20 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Felipe Monteiro de Carvalho

Hello,

I commited various fixes to qt menus. I'm very happy with Qt's progress, specially the magnifier running each day better on it. Perhaps we are moving from Alpha to a early beta =)

Maybe it's time to create a worse qt bugs, revisited?

The only really bad bug I notice now with the magnifier is that the trayicon icon appears with wrong colors, and sometimes it looks like there is noise on the image.

Felipe Monteiro de Carvalho
Hess, Philip J
to Felipe Monteiro de Carvalho

Yesterday I noticed that a TCheckBox's Checked property doesn't appear to reflect the visual state of the check box. Setting it works and checking/unchecking works, but Checked doesn't seem to change. I looked at the Qt widgetset code but didn't see the problem offhand. Should be easy to fix I would think if location of problem can be found.

Also, TStringGrid isn't finished. This is a useful, commonly used control that I would think we would want to have in the widgetset.

Some of the Orpheus ported controls now work a bit better with Qt. These depend heavily on the widgetset API plumbing and are good tests of API maturity. For example, the TOvcURL control (TLabel descendent) now appears but clicking it crashes (or maybe just moving mouse over it - can't remember exactly now).

Thanks.

Earlier message 22 lines
-----Original Message----- From: [mailto:] On Behalf Of Felipe Monteiro de Carvalho Sent: Monday, January 29, 2007 4:42 PM To: Items specific to the Qt widget set Subject: [Qt] Qt progress Hello, I commited various fixes to qt menus. I'm very happy with Qt's progress, specially the magnifier running each day better on it. Perhaps we are moving from Alpha to a early beta =) Maybe it's time to create a worse qt bugs, revisited? The only really bad bug I notice now with the magnifier is that the trayicon icon appears with wrong colors, and sometimes it looks like there is noise on the image. -- Felipe Monteiro de Carvalho
Felipe Monteiro de Carvalho
to Hess, Philip J
Philip J wrote
Yesterday I noticed that a TCheckBox's Checked property doesn't appear to reflect the visual state of the check box.

I just added a button and a checkbox to a form, and put this code:

procedure TForm2.Button4Click(Sender: TObject);
begin
  if CheckBox1.Checked then Caption := 'Checked'
  else Caption := 'Unchecked';
end;

Works perfectly

Need more details to reproduce.

Felipe Monteiro de Carvalho
Hess, Philip J
to Felipe Monteiro de Carvalho: I just added a button and a checkbox to a form, and put this code: procedure…

The attached project should illustrate the TCheckBox problem.

Thanks.

Earlier message 23 lines
-----Original Message----- From: on behalf of Felipe Monteiro de Carvalho Sent: Mon 1/29/2007 6:50 PM To: Items specific to the Qt widget set Subject: Re: [Qt] Qt progress On 1/29/07, Hess, Philip J wrote: > Yesterday I noticed that a TCheckBox's Checked property doesn't appear > to reflect the visual state of the check box. I just added a button and a checkbox to a form, and put this code: procedure TForm2.Button4Click(Sender: TObject); begin if CheckBox1.Checked then Caption := 'Checked' else Caption := 'Unchecked'; end; Works perfectly Need more details to reproduce. -- Felipe Monteiro de Carvalho
Hess, Philip J
to Felipe Monteiro de Carvalho: I just added a button and a checkbox to a form, and put this code: procedure…

My first attempt to send 3 small .tiff files was blocked because the total was >40 KB. Would be nice if this could be increased!

I can't figure out what's going on with buttons on OS X with the Qt widgetset. GTK and Carbon buttons work fine, but with Qt it appears as though it's changing the dimensions, shape and even the position.

Anybody have an idea about what's going on?

Here's a screenshot using GTK. 2 more will follow.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/ms-tnef
Size: 25945 bytes
Desc: not available
URL: <http://lists.lazarus.freepascal.org/pipermail/qt/attachments/20070129/5355730a/attachment.bin>

Hess, Philip J
to Felipe Monteiro de Carvalho: I just added a button and a checkbox to a form, and put this code: procedure…

Well, even a single 32 KB .tiff is too big to send. Seems 32KB is greater than 40KB once it's been packaged up in an e-mail.

Felipe, I'll send these 3 screenshots of button problems on Qt to you directly.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/ms-tnef
Size: 2569 bytes
Desc: not available
URL: <http://lists.lazarus.freepascal.org/pipermail/qt/attachments/20070129/e6838fd8/attachment.bin>

Felipe Monteiro de Carvalho
to Hess, Philip J: My first attempt to send 3 small .tiff files was blocked because the total was >40 KB.…
Philip J wrote
I can't figure out what's going on with buttons on OS X with the Qt widgetset. GTK and Carbon buttons work fine, but with Qt it appears as though it's changing the dimensions, shape and even the position.

It's easy to fix this, but needs someone with a mac machine. Here are the steps to fix:

1 - Create a pure Qt application with those 3 buttons. Should be trivial, just a few lines of code. If you want, I can create such app for you.

2 - If the qt app has the same problem, go to #qt on FreeNode and complain there. Qt developers hang around there and should know what the problem is.

Felipe Monteiro de Carvalho
Felipe Monteiro de Carvalho
to Hess, Philip J: The attached project should illustrate the TCheckBox problem. Thanks. -----Original…

I sligtly modifyed the app to have 2 buttons. One to read the checkboxes from the other form, and another to show it.

It seams that when you show a modal form, Qt simply won't store what changed on the checkboxes. If you use just Show instead of Show modal, it will store the values correctly.

Looks like a Qt normal behavior. Maybe it's configurable, maybe it's a Qt bug. ShowModal code is very trivial, and there is nothing wrong with our checkboxes.

Code:

procedure TForm1.Button1Click(Sender: TObject);
begin
  Form2.ShowModal;
end;
procedure TForm1.Button2Click(Sender: TObject);
var
  MsgStr : string;
begin
    if Form2.CheckBox1.Checked then
      MsgStr := 'CheckBox1 is checked.  '
    else
      MsgStr := 'CheckBox1 is not checked.  ';
    if Form2.CheckBox2.Checked then
      MsgStr := MsgStr + 'CheckBox2 is checked.'
    else
      MsgStr := MsgStr + 'CheckBox2 is not checked.';
    Label1.Caption := MsgStr;
end;
Felipe Monteiro de Carvalho
Felipe Monteiro de Carvalho
to Felipe Monteiro de Carvalho
Felipe Monteiro de Carvalho wrote
Looks like a Qt normal behavior. Maybe it's configurable, maybe it's a Qt bug. ShowModal code is very trivial, and there is nothing wrong with our checkboxes.

Oooops. I just tested with a pure Qt program and I don't see this issue .... so it's on our side =)

attached test program

Felipe Monteiro de Carvalho -------------- next part -------------- A non-text attachment was scrubbed... Name: pureqt.lpr Type: application/octet-stream Size: 2735 bytes Desc: not available URL: <http://lists.lazarus.freepascal.org/pipermail/qt/attachments/20070130/ab2e838c/attachment.obj>
Hess, Philip J
to Felipe Monteiro de Carvalho: It's easy to fix this, but needs someone with a mac machine. Here are the steps to fix: 1…

Felipe,

Yes, if you want to create a non-LCL app with buttons, I'll test it on OS X. I'm not sure how to pass the dimensions of the button to QPushButton_create without the LCL.

There appear to be lots of functions in Qt related to "size policy" and "size hint". I wonder if these need to be specified somehow in the widgetset.

Thanks.

-Phil

Earlier message 26 lines
-----Original Message----- From: [mailto:] On Behalf Of Felipe Monteiro de Carvalho Sent: Monday, January 29, 2007 10:27 PM To: Items specific to the Qt widget set Subject: Re: [Qt] GTK buttons On 1/30/07, Hess, Philip J wrote: > I can't figure out what's going on with buttons on OS X with the Qt widgetset. GTK and Carbon buttons work fine, but with Qt it appears as though it's changing the dimensions, shape and even the position. It's easy to fix this, but needs someone with a mac machine. Here are the steps to fix: 1 - Create a pure Qt application with those 3 buttons. Should be trivial, just a few lines of code. If you want, I can create such app for you. 2 - If the qt app has the same problem, go to #qt on FreeNode and complain there. Qt developers hang around there and should know what the problem is. -- Felipe Monteiro de Carvalho
Hess, Philip J
to Felipe Monteiro de Carvalho

Same problems with pure Qt.

What do you use for documentation of Qt methods that Den's library is calling?

Thanks.

Earlier message 23 lines
-----Original Message----- From: on behalf of Felipe Monteiro de Carvalho Sent: Tue 1/30/2007 5:46 PM To: Items specific to the Qt widget set Subject: Re: [Qt] GTK buttons I attached the program. > I'm not sure how to pass the dimensions of the button to QPushButton_create without the LCL. It's trivial: QWidget_setGeometry(Button1, 100, 100, 63, 32); -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/ms-tnef Size: 23338 bytes Desc: not available URL: <http://lists.lazarus.freepascal.org/pipermail/qt/attachments/20070130/e0b851bb/attachment.bin>
Hess, Philip J
to Felipe Monteiro de Carvalho

Here's a discussion about the need for a layout manager for buttons on OS X (although they're using Qt 3.3) and possibly the need to include all widgets in a layout manager on all platforms:

http://lists.trolltech.com/qt-interest/2004-02/thread01233-0.html

There's also some things about buttons in the description of QMacStyle, which I assume is used automatically by default by Qt (according to QStyle description):

http://doc.trolltech.com/4.2/qmacstyle.html

Thanks.

-Phil

Earlier message 15 lines
-----Original Message----- From: [mailto:] On Behalf Of Felipe Monteiro de Carvalho Sent: Tuesday, January 30, 2007 9:04 PM To: Items specific to the Qt widget set Subject: Re: [Qt] GTK buttons On 1/30/07, Hess, Philip J wrote: > Same problems with pure Qt. I think it?s time to complain to Trolltech =) A good try is searching qt bugtracker to see if there is a bug about this. -- Felipe Monteiro de Carvalho
Hess, Philip J
to Felipe Monteiro de Carvalho

Felipe,

I've attached a screenshot that illustrates some things with Qt buttons and text edits.

I've also attached the code that I used to generate this.

The 4th button's size is set based on the "size hint" that Qt returns. This is supposed to be the optimized size to use for the button.

I tried overriding TQtPushButton's SetGeometry method to set the button size using the size hint, but nothing happened. Maybe SetGeometry is not getting called?

I thought this might be a simple way (with $IFDEF) of getting normal-looking buttons with OS X.

Also, note the rectangle around the text edits. In LCL these rectangles do not appear with TEdit's that don't have the focus.

Note: I upgraded to OS X 10.4 (Tiger) over the weekend and now executables link much faster than before. Not sure if this is due to recent speedups in FPC (still using 2.0.4) or a faster linker with 10.4 but compiling is really painless now even on my old hardware (6 years and counting). It's nice to see things get faster for once with an upgrade instead of slower as usually happens.

Thanks.

-Phil

Earlier message 12 lines
-----Original Message----- From: on behalf of Felipe Monteiro de Carvalho Sent: Wed 1/31/2007 4:40 PM To: Items specific to the Qt widget set Subject: Re: [Qt] GTK buttons Ummm ... it seams Qt does what you are seeing on purpose. Looks a bad design choice to me. -- Felipe Monteiro de Carvalho