Discussion:
guidata: How to define the position of a dialog?
ufechner
2012-10-31 12:45:36 UTC
Permalink
Hello,

I am running the basic example:

# -*- coding: utf-8 -*-

import guidata

try:

tmp

except NameError:

tmp = guidata.qapplication() # not required if a QApplication has already
been created


import guidata.dataset.datatypes as dt

import guidata.dataset.dataitems as di


class Processing(dt.DataSet):

"""Example"""

a = di.FloatItem("Parameter #1", default=2.3)

b = di.IntItem("Parameter #2", min=0, max=10, default=5)

type = di.ChoiceItem("Processing algorithm",

("type 1", "type 2", "type 3"))


param = Processing()

param.edit()

How can I make sure that the dialog is centered on the screen?

It is when I run it the first time, but every other time it is in the top
left corner.

Thank's for your help!

Uwe Fechner
Pierre Raybaut
2012-11-04 14:18:51 UTC
Permalink
Hi,

I can't reproduce this behavior.

When I run this script several times within the same Python
interpreter, the dialog is always centered on the screen.

What platform are you using?
Which version of guidata?
How do you run the script?

-Pierre
Post by ufechner
Hello,
# -*- coding: utf-8 -*-
import guidata
tmp
tmp = guidata.qapplication() # not required if a QApplication has already
been created
import guidata.dataset.datatypes as dt
import guidata.dataset.dataitems as di
"""Example"""
a = di.FloatItem("Parameter #1", default=2.3)
b = di.IntItem("Parameter #2", min=0, max=10, default=5)
type = di.ChoiceItem("Processing algorithm",
("type 1", "type 2", "type 3"))
param = Processing()
param.edit()
How can I make sure that the dialog is centered on the screen?
It is when I run it the first time, but every other time it is in the top
left corner.
Thank's for your help!
Uwe Fechner
Loading...