So ive got a bit of a problem here. Ive been searching the net about this for quite some time now but i just cant seem to figure out how to open a dialog that ive made in QtDesigner.
Of corse i used pyuic4 to make it into python code.
This is the code for my dialog window(it contains just a TextEdit and a LineEdit): - from PyQt4 import QtCore, QtGui
-
-
class Ui_Dialog(object):
-
def setupUi(self, Dialog):
-
Dialog.setObjectName("Dialog")
-
Dialog.resize(QtCore.QSize(QtCore.QRect(0,0,400,283).size()).expandedTo(Dialog.minimumSizeHint()))
-
-
self.textEdit = QtGui.QTextEdit(Dialog)
-
self.textEdit.setGeometry(QtCore.QRect(13,14,381,231))
-
self.textEdit.setObjectName("textEdit")
-
-
self.lineEdit = QtGui.QLineEdit(Dialog)
-
self.lineEdit.setGeometry(QtCore.QRect(20,250,371,27))
-
self.lineEdit.setObjectName("lineEdit")
-
-
self.retranslateUi(Dialog)
-
QtCore.QMetaObject.connectSlotsByName(Dialog)
-
-
def retranslateUi(self, Dialog):
-
Dialog.setWindowTitle(QtGui.QApplication.translate("Dialog", "Dialog", None, QtGui.QApplication.UnicodeUTF8))
So how would i go about to get this dialog to show?
I've tried this method here beneather. It doesnt produce any errors, but the dialog doesnt appear eather. - def openDialog(self):
-
window = QtGui.QDialog()
-
d = TestDialog()
-
d.setupUi(window)
-
window.show()
Thanks for your help guys
0 1816 Sign in to post your reply or Sign up for a free account.
Similar topics
by: Vamsi Mudrageda |
last post by:
I am kind of new to Python, and after trying and using wxPython, I found
it kind of lacking in easy-to-read documentation, speed at loading, and
GUI response-time.
So I am looking for an another...
|
by: simo |
last post by:
OK, so I'm at the stage where I want to make a choice between wxPython
and PyQt.
Currently I'm using wxPython mainly due to the fact that it has GPL
Linux and Windows versions.
I prefer Qt to...
|
by: Phil Thompson |
last post by:
Riverbank Computing is pleased to announce the release of PyQt v3.14 available
from http://www.riverbankcomputing.co.uk/.
Changes since the last release include support for QScintilla v1.5.
...
|
by: Phil Thompson |
last post by:
Riverbank Computing is pleased to announce the release of PyQt v4.0beta1
available from http://www.riverbankcomputing.co.uk/pyqt/.
PyQt is a comprehensive set of Qt bindings for the Python...
|
by: Marcpp |
last post by:
I have a program (python + pyqt), with a button I'll would to open a
new dialog window to input text, when press save or ok, this text is
returned to the principal program.
I've seek in internet...
|
by: skawaii |
last post by:
Ok, here's what's going on. I've just created a custom widget. it
works great. I'm having some trouble, however, figuring out how to
allow the said widget to resize. For example, when I throw the...
|
by: David Boddie |
last post by:
On Fri Nov 2 12:59:48 CET 2007, Bart. wrote:
You can use PyQt, Kross or PythonQt for this, but only PyQt will give you
a comprehensive API "out of the box".
There is code in the PyQt source...
|
by: Kevin Walzer |
last post by:
is it possible to write the GUI code for PyQt applications by hand or
is using the Qt Designer an essential part of the process? Coming from a
Tkinter background, with a little exposure to...
|
by: king kikapu |
last post by:
Hi, this is actually goes to whoever is using Eclipse and Eric4, the
IDE that comes bundled with PyQt.
I was using Eclipse until i saw Eric4 and i started experiment with
it, very nice work.
...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
| |