A few questions

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

A few questions

Postby yogiyang » Tue Apr 24, 2012 10:19 am

I observed that all projects should have file named "MainWindow.QMainWindow.q7b" which is the entry or starting point.

I am not able to figure as to how can I write a program that will start from a module and it will create QMain Window from code?

When developing in other dev tools I usually keep all modules, classes, etc. in separate folder within project folder. How can I achieve this in Q7Basic?
yogiyang
 
Posts: 50
Joined: Mon Jun 14, 2010 3:54 am

Re: A few questions

Postby berndnoetscher » Wed Apr 25, 2012 7:22 am

<<QMain Window from code?

That is not possible and I see no reason/advantage to support this - sorry. But any other window my be created with code.
berndnoetscher
Site Admin
 
Posts: 344
Joined: Thu Mar 25, 2010 9:57 am

Re: A few questions

Postby yogiyang » Thu Apr 26, 2012 5:27 am

berndnoetscher wrote:<<QMain Window from code?

That is not possible and I see no reason/advantage to support this - sorry. But any other window my be created with code.

I feel that there is a requirement for this.

For example we have a software in which we have module which first show log in screen. Once user logs in successfully, it unloads log in screen & it check user rights and set required settings and then show the main window. But if log in fails we reshow log in screen.

In such situation according to you who should we achieve this when using Q7Basic?
yogiyang
 
Posts: 50
Joined: Mon Jun 14, 2010 3:54 am

Re: A few questions

Postby berndnoetscher » Thu Apr 26, 2012 7:14 am

yogiyang wrote:
berndnoetscher wrote:<<QMain Window from code?

That is not possible and I see no reason/advantage to support this - sorry. But any other window my be created with code.

I feel that there is a requirement for this.

For example we have a software in which we have module which first show log in screen. Once user logs in successfully, it unloads log in screen & it check user rights and set required settings and then show the main window. But if log in fails we reshow log in screen.

In such situation according to you who should we achieve this when using Q7Basic?


The normal main window is the login window (you can do it without menubar etc.) and after that you code your actual main window. I would like to present an example, but don't know when it will be ready...
berndnoetscher
Site Admin
 
Posts: 344
Joined: Thu Mar 25, 2010 9:57 am

Re: A few questions

Postby Slowdown » Thu Apr 26, 2012 7:21 pm

if time is no problem i will make the example but be patient, i'm quite busy at this moment.
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 » Thu Apr 26, 2012 11:01 pm

@yogiyang

Make your login window in MainWindow.QMainWindow.

Add a new Window from Menu Project "New Class with Superclass / QWIdget" and name it MyMainWindow or whatever. This will add the code module for the new window.
Then create the GUI with QtDesigner.
In MyMainWindow.QWidget add Outlets and Signals and code.

When login successful, close MainWindow.QMainWindow and Open MyMainWindow.

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

Re: A few questions

Postby Slowdown » Fri Apr 27, 2012 8:27 am

@yogiyang,

just a way to do it.
LogIn.zip
(2.06 KiB) Downloaded 84 times
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 yogiyang » Fri Apr 27, 2012 12:29 pm

@Slowdown,

Thanks for this sample. I will study it and get back if I have any more questions.

Once again thanks a lot.

Regards,
yogiyang
 
Posts: 50
Joined: Mon Jun 14, 2010 3:54 am

Re: A few questions

Postby Henning » Tue May 01, 2012 4:15 pm

Hi,

I made another LogIn project, but... why doesn't MainWindow Close????

LogIn2.zip
(2.28 KiB) Downloaded 64 times


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

Re: A few questions

Postby Slowdown » Tue May 01, 2012 7:07 pm

@Henning,
now it does ;)
LogIn2.zip
(2.44 KiB) Downloaded 71 times
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

Next

Return to Questions & Answers

Who is online

Users browsing this forum: No registered users and 1 guest

cron