473,387 Members | 1,512 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Form1.show()

hi ! iam newbie on python.
how i can make form1 visible ? form just crated by pyqt

class Form1(QMainWindow):
def __init__(self,parent = None,name = None,fl = 0):
QMainWindow.__init__(self,parent,name,fl)
self.statusBar()

............

if self.MenuBar.findItem(1):
self.MenuBar.findItem(1).setText(self.__tr("&File" ))
if self.MenuBar.findItem(2):
self.MenuBar.findItem(2).setText(self.__tr("&Edit" ))
if self.MenuBar.findItem(3):
self.MenuBar.findItem(3).setText(self.__tr("&Help" ))
def fileNew(self):
print "Form1.fileNew(): Not implemented yet"

......
def __tr(self,s,c = None):
return qApp.translate("Form1",s,c)

Feb 9 '06 #1
1 1581
errmaker schrieb:
hi ! iam newbie on python.
how i can make form1 visible ? form just crated by pyqt

class Form1(QMainWindow):
def __init__(self,parent = None,name = None,fl = 0):
QMainWindow.__init__(self,parent,name,fl)
self.statusBar()

............

if self.MenuBar.findItem(1):
self.MenuBar.findItem(1).setText(self.__tr("&File" ))
if self.MenuBar.findItem(2):
self.MenuBar.findItem(2).setText(self.__tr("&Edit" ))
if self.MenuBar.findItem(3):
self.MenuBar.findItem(3).setText(self.__tr("&Help" ))
def fileNew(self):
print "Form1.fileNew(): Not implemented yet"

......
def __tr(self,s,c = None):
return qApp.translate("Form1",s,c)


Look at teh examples of PyQt - you need to have an application instanced
and calle its event-loop.
Diez
Feb 9 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: nadir b | last post by:
hi I don't know how to change for exemple a form1 caption text from form2 don't forget that form2 has created from form1 I want sample code with c# *** Sent via Developersdex...
6
by: Jonathan | last post by:
Hi, I have 2 forms "Form1" & "Form2" In Form1, there is a button to click to open Form2 and set Form1.Enabled = False However, when i finish using Form2, i cannot Enable Form1? In Form2, i...
2
by: Hareth | last post by:
VS2003 if i say dim form1 as new form1 form1.show() It opens a new form everytime... But....what if....
1
by: Richard | last post by:
Hello there, I have a form that is called from a Sub Main procedure using application.run(Form1). On my main form there is a button to open an instance of Form2 and then at the same time hide...
3
by: Karan | last post by:
I am calling finalize when form2 loads and deactivates form1 which closes form1. However, same thing is not happening in form2 because finalize is already called. Does anybody has solution to it....
3
by: R. Harris | last post by:
Hi. I have 2 forms: form1 form2 On Form2 I have a listbox and a button. When I click the button it calls a function from form1 and within that function it updates the listbox on form2. My...
9
by: wanyok | last post by:
I thought I had it figured out but I'm still getting errors :( I would appreciate any help I could get. I have two forms: Form1 and frmVerify. Once the info gets submitted on Form1 its text...
1
by: Suma | last post by:
Hi, i have a problem with the controls .i have to validate Form1 Radio button option is checked or Not in the Form2. even after checking the radio button also in FOrm2 it is always taking as...
7
by: Boki | last post by:
Hi All, I want to change WindowState of form1 from form2. I tried these two methods, but no luck on both. (1) Declare a public method: /* function of form1 */ public void...
0
by: ezrollers | last post by:
I'm still learning C# and this is really annoying me. I need to modify the contents of a text box on a windows program. (Using windows app template on VS 2005) I have created a property on...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.