A few questions

Coding + IDE + Code-Editor + Syntax + User-Functions + Anything else

Re: A few questions

Postby Henning » Tue May 01, 2012 9:54 pm

Sorry to say it, but:

MainWindow.Hide will NOT compile, and neither will MainWindow.Close. No error, the compiler just stops and leaves...

It seems MainWindow doesn't have all subs/functions of a "standard" QWidget activated.

/Henning
Henning
 
Posts: 523
Joined: Fri Aug 13, 2010 6:29 pm

Re: A few questions

Postby berndnoetscher » Wed May 02, 2012 8:11 am

Henning wrote:Sorry to say it, but:

MainWindow.Hide will NOT compile, and neither will MainWindow.Close. No error, the compiler just stops and leaves...

It seems MainWindow doesn't have all subs/functions of a "standard" QWidget activated.

/Henning


This works for me:
Code: Select all
Outlet pushButton As QPushButton

Signal on_pushButton_clicked(Checked As Boolean)
  MsgBox("on_pushButton_clicked")
  MainWindow.Hide()
End Signal



But MainWindow.Close() does not work yet.
berndnoetscher
Site Admin
 
Posts: 344
Joined: Thu Mar 25, 2010 9:57 am

Re: A few questions

Postby Henning » Wed May 02, 2012 11:02 am

This works for me:


No it does not compile when executed from Form2!

The compiler just breaks and leaves when compiling Form2.

/Henning
Henning
 
Posts: 523
Joined: Fri Aug 13, 2010 6:29 pm

Re: A few questions

Postby Slowdown » Wed May 02, 2012 7:26 pm

Henning is right.
Don't understand it but i tested the code several times before posting and this evening
the compiler keeps complaining.
I think i isolate the problem but i'm not sure and perhaps B can shine some light onto it.
Mainwindow can only be closed from MainWindow.
I changed the code again tested it and it works now but not the way Henning has planned it to be.
LogIn2.zip
(2.46 KiB) Downloaded 39 times

Schermafbeelding 2012-05-02 om 21.06.52.png
Schermafbeelding 2012-05-02 om 21.06.52.png (12.42 KiB) Viewed 343 times

Schermafbeelding 2012-05-02 om 21.18.20.png
Schermafbeelding 2012-05-02 om 21.18.20.png (10.05 KiB) Viewed 343 times

MainWindow is hidden when MyWindow is showed.
Kind regards,
Slowdown

OSX 10.8.x, VBox Xp, Ubuntu 32/64 bit, EOS 64 bit
Slowdown
 
Posts: 465
Joined: Sat May 01, 2010 7:11 pm
Location: Netherlands

Re: A few questions

Postby Henning » Wed May 02, 2012 8:53 pm

@Slowdown
Thanx for testing. :) I've come to the same results.


It seems like MainWindow for some reason is *specal*, I don't understand why? The prfered behaviour is to mimic KBasic, any Window/Form or a Module with a Sub Main() can be the start-up Object.
The only *special* Objects as I see it are Application and Global.

Waiting for B's explanaition.

/Henning
Henning
 
Posts: 523
Joined: Fri Aug 13, 2010 6:29 pm

Re: A few questions

Postby berndnoetscher » Thu May 03, 2012 8:23 am

Henning wrote:@Slowdown
Thanx for testing. :) I've come to the same results.


It seems like MainWindow for some reason is *specal*, I don't understand why? The prfered behaviour is to mimic KBasic, any Window/Form or a Module with a Sub Main() can be the start-up Object.
The only *special* Objects as I see it are Application and Global.

Waiting for B's explanaition.

/Henning


There is a variable missing in some case. I fixed it. Sorry.
berndnoetscher
Site Admin
 
Posts: 344
Joined: Thu Mar 25, 2010 9:57 am

Previous

Return to Questions & Answers

Who is online

Users browsing this forum: No registered users and 0 guests

cron