Sign in Join

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

Mailing lists / qt / 2007-09

QAbstractSpinBox_lineEdit(...)

13 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

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

Павел Ишенин

Hello, Items specific to the Qt widget set

QAbstractSpinBox have protected function which I need to complete spin edits:
QLineEdit * lineEdit() const;

Best regards,
Paul Ishenin.

Павел Ишенин
to Павел Ишенин
QAbstractSpinBox have protected function which I need to complete spin edits: QLineEdit * lineEdit() const;

Sorry, I sent this without finishing.

Den, can you add protected function to bindings?

Best regards,
Paul Ishenin.

zeljko
to Павел Ишенин: Hello, Items specific to the Qt widget set QAbstractSpinBox have protected function which…
????? ?????? wrote 5 lines
Hello, Items specific to the Qt widget set QAbstractSpinBox have protected function which I need to complete spin edits: QLineEdit * lineEdit() const;

why do you need lineEdit() ?

btw. I've had 10 free minutes today, so compiled latest svn, and found that there's again bug with window closing (when you press on "X"), and FormCloseQuery() i assigned ....
Modal Windows:
It dissapears, and then I have confirmation dialog, if U answer "No", then it have strange results .... must kill app.
Normal windows:
If you answer Yes or No it's closed.
App. Main Window:
If you answer Yes it closed normally, but if U press No, app main window disappear and app is still running.

zeljko

Павел Ишенин
to zeljko
zeljko wrote 11 lines
On Wednesday 12 September 2007 16:07, ????? ?????? wrote: > Hello, Items specific to the Qt widget set > > QAbstractSpinBox have protected function which I need to complete spin > edits: > QLineEdit * lineEdit() const; > why do you need lineEdit() ?
to implement missed things in TQtWSCustomFloatSpinEdit:
    class function GetSelStart(const ACustomEdit: TCustomEdit): integer;
override;
    class function GetSelLength(const ACustomEdit: TCustomEdit):
integer; override;
    class procedure SetSelLength(const ACustomEdit: TCustomEdit;
NewLength: integer); override;
    class procedure SetSelStart(const ACustomEdit: TCustomEdit;
NewStart: integer); override;
Show quoted text 12 lines
btw. I've had 10 free minutes today, so compiled latest svn, and found that there's again bug with window closing (when you press on "X"), and FormCloseQuery() i assigned .... Modal Windows: It dissapears, and then I have confirmation dialog, if U answer "No", then it have strange results .... must kill app. Normal windows: If you answer Yes or No it's closed. App. Main Window: If you answer Yes it closed normally, but if U press No, app main window disappear and app is still running.

I have not looked at that problem. If it is very annoying to you I will look tomorow.

Best regards,
Paul Ishenin.

zeljko
to Павел Ишенин
????? ?????? wrote 14 lines
> btw. I've had 10 free minutes today, so compiled latest svn, and found > that there's again bug with window closing (when you press on "X"), and > FormCloseQuery() i assigned .... > Modal Windows: > It dissapears, and then I have confirmation dialog, if U answer "No", > then it have strange results .... must kill app. > Normal windows: > If you answer Yes or No it's closed. > App. Main Window: > If you answer Yes it closed normally, but if U press No, app main window > disappear and app is still running. I have not looked at that problem. If it is very annoying to you I will look tomorow.

I will not have any free time tomorrow, but it's possible that I'll take some time during saturday & sunday , and write some code :)

zeljko

Den Jean
to Павел Ишенин: Sorry, I sent this without finishing. Den, can you add protected function to bindings?…
????? ?????? wrote
Den, can you add protected function to bindings?

quick hack:

qt4.pas:
function QAbstractSpinBox_lineEdit(handle: QAbstractSpinBoxH): QLineEditH;
cdecl; external QtIntf name 'QAbstractSpinBox_lineEdit';

lib source code:
QLineEditH QAbstractSpinBox_lineEdit(QAbstractSpinBoxH handle) {

	return (QLineEditH) ((QAbstractSpinBox *)handle)->lineEdit();

}

compile output:
../qt-x11-opensource-src-4.2.3//include/QtGui/../../src/gui/widgets/qabstractspinbox.h:130: error: ?QLineEdit* QAbstractSpinBox::lineEdit() const? is protected lib/qabstractspinbox.cppb:186: error: within this context

bad luck ;-)
So I will see what I can do, this will not be an easy thing. I know what to do manually (derive a class,change access specificier,misuse typecast,...), but is too bad I do not have a nice generator framework. Perhaps I will just postpone the generator modification till I get more requests for protected functions.

So I will look into it, but have some patience.

regards,

Den Jean

Den Jean
to Den Jean
Den Jean wrote
So I will look into it, but have some patience.

I did another quick hack:

V1.49:

function QLCLAbstractSpinBox_lineEditHandle(protectedhandle: QAbstractSpinBoxH): QLineEditH;
Paul Ishenin
to zeljko: why do you need lineEdit() ? btw. I've had 10 free minutes today, so compiled latest svn,…
zeljko wrote 11 lines
btw. I've had 10 free minutes today, so compiled latest svn, and found that there's again bug with window closing (when you press on "X"), and FormCloseQuery() i assigned .... Modal Windows: It dissapears, and then I have confirmation dialog, if U answer "No", then it have strange results .... must kill app. Normal windows: If you answer Yes or No it's closed. App. Main Window: If you answer Yes it closed normally, but if U press No, app main window disappear and app is still running.

You mean that this bug was not present at some moment?

I checked what happen (but I dont know what happen in qt core ofcource). In order to prevent window closing we must set ignore flag for QCloseEvent and we are doing that in qtwidgets.pas. Also we talking to qt that we handle that signal ourself. Dont know what qt need? It acts as ignore flag is not set. I belive bindings are innosence in this case.

Zeljan, if you know revision where that feature was working please tell me.

Best regards,
Paul Ishenin.

zeljko
to Paul Ishenin
Paul Ishenin wrote 14 lines
zeljko wrote: > btw. I've had 10 free minutes today, so compiled latest svn, and found > that there's again bug with window closing (when you press on "X"), and > FormCloseQuery() i assigned .... > Modal Windows: > It dissapears, and then I have confirmation dialog, if U answer "No", > then it have strange results .... must kill app. > Normal windows: > If you answer Yes or No it's closed. > App. Main Window: > If you answer Yes it closed normally, but if U press No, app main window > disappear and app is still running. You mean that this bug was not present at some moment?

yep, it was ok before I went onto vacations (beginning of August).

I checked what happen (but I dont know what happen in qt core ofcource).

nothing happened in qt core, 4.3.0 and 4.3.1 have same problem.

In order to prevent window closing we must set ignore flag for QCloseEvent and we are doing that in qtwidgets.pas. Also we talking to qt that we handle that signal ourself. Dont know what qt need? It acts as ignore flag is not set. I belive bindings are innosence in this case.

That's the problem I've been talkin about with Den few months ago, he sent fix with lcl glue message (SlotClose()), and then it was ok. Maybe something changed in LCL ?

zeljko

Павел Ишенин
to zeljko
zeljko wrote
That's the problem I've been talkin about with Den few months ago, he sent fix with lcl glue message (SlotClose()), and then it was ok. Maybe something changed in LCL ?

I've made rather big restructuring and code moving, so my changes can cause this problem. But I am curious what was in Den's fix? If you give me some tips I will look more closely.

Best regards,
Paul Ishenin.

zeljko
to Павел Ишенин
????? ?????? wrote 8 lines
zeljko wrote: > That's the problem I've been talkin about with Den few months ago, he > sent fix with lcl glue message (SlotClose()), and then it was ok. Maybe > something changed in LCL ? I've made rather big restructuring and code moving, so my changes can cause this problem. But I am curious what was in Den's fix? If you give me some tips I will look more closely.

nothing, just SlotClose() code as it is now and LCLGlueMessages in uses of qtwidgets.pas.
Before that it was declaration of TLMessage and DeliverMessage() method. I must say that I didn't understand that fix (mainly because of no time to read docs about lcl internals) but it worked ok.

Paul Ishenin
to zeljko
zeljko wrote 5 lines
nothing, just SlotClose() code as it is now and LCLGlueMessages in uses of qtwidgets.pas. Before that it was declaration of TLMessage and DeliverMessage() method. I must say that I didn't understand that fix (mainly because of no time to read docs about lcl internals) but it worked ok.
No, code was ok. Just one missed "Result := inherited" in overrided
EventFilter :)

fixed.

Best regards,
Paul Ishenin.

zeljko
to Paul Ishenin
Paul Ishenin wrote 9 lines
zeljko wrote: > nothing, just SlotClose() code as it is now and LCLGlueMessages in uses > of qtwidgets.pas. > Before that it was declaration of TLMessage and DeliverMessage() method. > I must say that I didn't understand that fix (mainly because of no time > to read docs about lcl internals) but it worked ok. No, code was ok. Just one missed "Result := inherited" in overrided EventFilter :)

great ! :)