I'm trying to build an app with extensive use of QDockwidgets. However, I've found that I cannot use QDockwidgets made in Qt Designer.
Here's my customized dockwidget.ui as displayed in Designer:
Here's the QMainWindow form main2.ui with promoted widget (called DockWidget with instance name dw)
Here's what the finished app looks like. The dockwidget is completely empty. Are there any tricks to getting a QDockWidget form (ui file) from Designer to display properly in PyQt5?
main2.py
import sys
from PyQt5 import uic, QtWidgets
from PyQt5.QtWidgets import QApplication
class Main(QtWidgets.QMainWindow, uic.loadUiType('main2.ui')[0]):
def __init__(self, parent=None):
super().__init__()
self.setupUi(self)
app = QApplication(sys.argv)
main = Main(None)
main.show()
sys.exit(app.exec_())
dockwidget.py
from PyQt5 import uic
from PyQt5.QtWidgets import QDockWidget
# ~ form_class = uic.loadUiType('dockwidget.ui')[0]
class DockWidget(QDockWidget):
def __init__(self, parent=None):
super().__init__()
uic.loadUi('dockwidget.ui', self)
main2.ui
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>MainWindow</class>
<widget class="QMainWindow" name="MainWindow">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>390</width>
<height>233</height>
</rect>
</property>
<property name="windowTitle">
<string>MainWindow</string>
</property>
<widget class="QWidget" name="centralwidget">
<property name="maximumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<layout class="QGridLayout" name="gridLayout"/>
</widget>
<widget class="QMenuBar" name="menubar">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>390</width>
<height>26</height>
</rect>
</property>
</widget>
<widget class="QStatusBar" name="statusbar"/>
<widget class="DockWidget" name="dw">
<attribute name="dockWidgetArea">
<number>4</number>
</attribute>
<widget class="QWidget" name="dockWidgetContents"/>
</widget>
</widget>
<customwidgets>
<customwidget>
<class>DockWidget</class>
<extends>QDockWidget</extends>
<header>dockwidget.h</header>
<container>1</container>
</customwidget>
</customwidgets>
<resources/>
<connections/>
</ui>
dockwidget.ui
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>DockWidget</class>
<widget class="QDockWidget" name="DockWidget">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>328</width>
<height>303</height>
</rect>
</property>
<property name="features">
<set>QDockWidget::DockWidgetClosable|QDockWidget::DockWidgetMovable</set>
</property>
<property name="allowedAreas">
<set>Qt::BottomDockWidgetArea|Qt::TopDockWidgetArea</set>
</property>
<property name="windowTitle">
<string>My Custom Dock Widget</string>
</property>
<widget class="QWidget" name="dockWidgetContents">
<layout class="QGridLayout" name="gridLayout_5">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item row="2" column="0">
<widget class="QRadioButton" name="radioButton_2">
<property name="text">
<string>RadioButton</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QRadioButton" name="radioButton">
<property name="text">
<string>RadioButton</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QPushButton" name="pushButton">
<property name="text">
<string>PushButton</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QRadioButton" name="radioButton_3">
<property name="text">
<string>RadioButton</string>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
<resources/>
<connections/>
</ui>
Similarly to scroll areas, Designer creates a "contents" widget for new QDockWidgets. That widget is actually set using setWidget() when the main window UI is loaded, and it cannot be removed from Designer.
You already have a contents widget in your custom QDockWidget, but when it's added by the main ui, it's "overwritten" by it.
Consider that promoted classes that act as containers should only have their contents set in the class as long as the promoted widget does not change/override them, otherwise the previously set contents will be removed. For instance, if you create a custom widget with its layout and buttons, and use it as a promoted class in Designer, you cannot set another layout and add other children to that widget from there.
The only way to avoid the issue and actually create a customizable QDockWidget that already has basic contents set and can be added to a QMainWindow in Designer would be to create a Designer plugin. That's not easy, the documentation is complex and, especially for python, extremely poor (with support even missing for some classes).
There are various possibilities here, though:
the simplest: do not add the dock widget to the main window in Designer, but only by explicitly calling addDockWidget() in your code;
create a promoted class for the dock widget contents (a basic QWidget/form), and promote the dockWidgetContents of the dock widget that is added to the main window ui;
as long as you are completely sure that you will never call again setWidget() on the dock widget, and you really need the dock widget in the main window of Designer, override setWidget() in a similar way:
class DockWidget(QDockWidget):
def __init__(self, parent=None):
super().__init__()
uic.loadUi('dockwidget.ui', self)
def setWidget(self, widget):
if self.widget() is None:
super().setWidget(widget)
with the above code, the setWidget() call made by uic/setupUi of the main window will be ignored, as at that point the dock widget already has a widget set by its own loadUi.
Related
I've recently studied the gtk design patterns, and found the in-app notifications. There is an description on when to use it, but no reference to the gtk api.
I have searched for it, but found just the GNotification and GApplication.send_notification, but this sends the notification to the desktop environment.
Can anyone help on finding an tutorial or example code for doing an in-app notification?
The app-notification "widget" is a mix of widgets, a css class and behaviors.
You should use a Gtk.Overlay in the window that you plan to use app-notifications then use a container (eg Gtk.Box) with the predefined app-notification style class. The notification container should be wrapped in a Gtk.Revealer to allow the reveal "slide" transition.
Here is a glade ui file (app-notification.ui) with an example:
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.22.1 -->
<interface>
<requires lib="gtk+" version="3.20"/>
<object class="GtkWindow" id="window1">
<property name="can_focus">False</property>
<property name="default_width">640</property>
<property name="default_height">480</property>
<child>
<placeholder/>
</child>
<child>
<object class="GtkOverlay" id="overlay">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkBox" id="box1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">APP-NOTIFICATION EXAMPLE</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="button1">
<property name="label" translatable="yes">show app-notification</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="index">-1</property>
</packing>
</child>
<child type="overlay">
<object class="GtkRevealer" id="revealer2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">center</property>
<property name="valign">start</property>
<child>
<object class="GtkBox" id="box2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">start</property>
<property name="spacing">20</property>
<child>
<object class="GtkLabel" id="label2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">This is an app-notification. Click the button to dismiss</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="button2">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="relief">none</property>
<child>
<object class="GtkImage" id="image2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="icon_name">window-close-symbolic</property>
</object>
</child>
<style>
<class name="image-button"/>
</style>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<style>
<class name="app-notification"/>
</style>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</interface>
The result in Glade:
And here is some python code that uses the previous glade file and gives some dynamic behavior to the notification so that you can see it in action by clicking the buttons. The glade file should be named app-notification.ui, otherwise change the code to reflect the given name:
import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk
def onButtonShow(self):
revealer.set_reveal_child(True)
def onButtonClose(self):
revealer.set_reveal_child(False)
builder = Gtk.Builder()
builder.add_from_file("app-notification.ui")
window = builder.get_object("window1")
buttonShow = builder.get_object("button1")
buttonClose = builder.get_object ("button2")
revealer = builder.get_object("revealer2")
buttonShow.connect ("clicked", onButtonShow)
buttonClose.connect ("clicked", onButtonClose)
window.connect ("destroy", Gtk.main_quit)
window.show_all()
Gtk.main()
If you prefer to create this without Glade, you can use something like this (based off the previous answer):
Assuming your current code has something like:
window = Gtk.ApplicationWindow(application=self)
window.add(main_widget)
Then you would change the code to something like this:
window = Gtk.ApplicationWindow(application=self)
overlay = Gtk.Overlay()
window.add(overlay)
overlay.add(main_widget)
self._notify_timeout = None
# Notification overlay widget
self._revealer = Gtk.Revealer(valign=Gtk.Align.START, halign=Gtk.Align.CENTER)
box = Gtk.Box(orientation="horizontal", spacing=18)
box.get_style_context().add_class("app-notification")
self._notify_label = Gtk.Label(wrap=True)
box.pack_start(self._notify_label, expand=False, fill=True, padding=18)
button = Gtk.Button.new_from_icon_name("window-close-symbolic", Gtk.IconSize.BUTTON)
button.set_relief(Gtk.ReliefStyle.NONE)
button.set_receives_default(True)
button.connect("clicked", functools.partial(self._revealer.set_reveal_child, False))
box.pack_start(button, expand=False, fill=True, padding=18)
self._revealer.add(box)
overlay.add_overlay(self._revealer)
Then to display a notification, you can add a method like:
def notify(self, message, timeout=5):
if self._notify_timeout is not None:
self._notify_timeout.cancel()
self._notify_label.set_text(message)
self._revealer.set_reveal_child(True)
if timeout > 0:
self._notify_timeout = asyncio.get_event_loop().call_later(
timeout, functools.partial(self._revealer.set_reveal_child, False))
In addition to what the existing answer provides, this adds a timeout to automatically remove the notification after a few seconds. That code assumes you are using asyncio, if not then update the above method to use another timer method.
I have following scenario:
There are many sites/departments and every site has it's own ServiceMix and different number of databases. Those databases are grouped, for example there are two groups: production_one and production_two.
On every site I deployed bundles as a datasource, one datasource for every database.
Datasource: blueprint.xml
<?xml version="1.0" encoding="UTF-8"?>
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:cxf="http://camel.apache.org/schema/blueprint/cxf"
xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0"
xsi:schemaLocation="
http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
http://camel.apache.org/schema/blueprint http://camel.apache.org/schema/blueprint/camel-blueprint.xsd">
<!-- Properties -->
<!-- blueprint property placeholders, that will use etc/datasources.cfg as the properties file -->
<cm:property-placeholder id="db.placeholder" persistent-id="datasources">
</cm:property-placeholder>
<!-- Datasource -->
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"
destroy-method="close">
<property name="driverClassName" value="com.microsoft.sqlserver.jdbc.SQLServerDriver" />
<property name="url"
value="jdbc:sqlserver://${bundle_ds_1_db_host}:${bundle_ds_1_db_port};databaseName=${bundle_ds_1_db_database};" />
<property name="username" value="${bundle_ds_1_db_username}" />
<property name="password" value="${bundle_ds_1_db_password}" />
</bean>
<!-- Init database-->
<bean id="initDatabase"
class="com.xyz.mssql.ds.DatabaseInitBean"
init-method="create" destroy-method="destroy">
<property name="ds" ref="dataSource" />
</bean>
<service ref="dataSource" interface="javax.sql.DataSource">
<service-properties>
<entry key="datasource.name" value="${bundle_ds_1_ds_name}" />
<entry key="datasource.type" value="${bundle_ds_1_ds_type}" />
<entry key="datasource.id" value="${bundle_ds_1_ds_id}" />
<entry key="datasource.group_id" value="${bundle_ds_1_ds_group_id}" />
</service-properties>
</service>
There is also bundle, which receives a SOAP message via cxf and process it by calling database:
CXF: blueprint.xml
<?xml version="1.0" encoding="UTF-8"?>
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:cxf="http://camel.apache.org/schema/blueprint/cxf"
xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0"
xsi:schemaLocation="
http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
http://camel.apache.org/schema/blueprint/cxf http://camel.apache.org/schema/blueprint/cxf/camel-cxf.xsd
http://camel.apache.org/schema/blueprint http://camel.apache.org/schema/blueprint/camel-blueprint.xsd">
<cxf:cxfEndpoint id="processXEndpoint" address="/mssql-soap1/"
serviceClass="com.xyz.mssql.soap1.ProcessXService" />
<bean id="saveDataProcessor"
class="com.xyz.mssql.soap1.SaveDataProcessor">
<property name="ds" ref="dataSource" />
</bean>
<bean id="getDataProcessor"
class="com.xyz.mssql.soap1.GetDataProcessor">
<property name="ds" ref="dataSource" />
</bean>
<!-- DataSource -->
<reference id="dataSource" interface="javax.sql.DataSource"
filter="(datasource.name=mssql-ds-1)">
<reference-listener bind-method="onBind"
unbind-method="onUnbind">
<bean class="com.xyz.mssql.soap1.ListenerBean" />
</reference-listener>
</reference>
<!-- Camel Context -->
<camelContext xmlns="http://camel.apache.org/schema/blueprint">
<route id="cxf">
<from uri="cxf:bean:processXEndpoint" />
<recipientList>
<simple>direct:${header.operationName}</simple>
</recipientList>
</route>
<route id="saveRoute">
<from uri="direct:saveData" />
<log message="Calling saveData" />
<process ref="saveDataProcessor" />
</route>
<route id="getRoute">
<from uri="direct:getData" />
<log message="Call getData" />
<process ref="getDataProcessor" />
</route>
</camelContext>
</blueprint>
The problem is, that following code inject to bean (ex: SaveDataProcessor) only one datasource resolved by it's name "datasource.name=mssql-ds-1", but I need to call many databases and on every servicemix installation there will be different number of them.
I need to call all databases (datasources) which have same type, for example "datasource.type=production_one".
Is it possible? How to do it?
How to pass to bean an array of datasources, or call this bean against every datasource which meet same conditions (name, type and so on).
I have three datasources configured in my persistence.xml:
<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd"
version="2.1">
<persistence-unit name="MyPersistenceUnit" transaction-type="JTA">
<jta-data-source>java:jboss/datasources/myDS</jta-data-source>
<properties>
<property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQLDialect" />
<property name="hibernate.connection.useUnicode" value="true" />
<property name="hibernate.connection.characterEncoding" value="UTF-8" />
<property name="hibernate.connection.charSet" value="UTF-8" />
<property name="hibernate.show_sql" value="true" />
<property name="hibernate.hbm2ddl.auto" value="validate" />
</properties>
</persistence-unit>
<persistence-unit name="MyPersistenceTestUnit" transaction-type="RESOURCE_LOCAL">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<properties>
<property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQLDialect" />
<property name="hibernate.connection.useUnicode" value="true" />
<property name="hibernate.connection.characterEncoding" value="UTF-8" />
<property name="hibernate.connection.charSet" value="UTF-8" />
<property name="hibernate.connection.url" value="jdbc:postgresql://localhost:5432/mydb" />
<property name="hibernate.connection.username" value="myuser" />
<property name="hibernate.connection.password" value="mypass" />
<property name="hibernate.show_sql" value="true" />
<property name="hibernate.hbm2ddl.auto" value="validate" />
</properties>
</persistence-unit>
<persistence-unit name="MyLoggingUnit" transaction-type="RESOURCE_LOCAL">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<properties>
<property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQLDialect" />
<property name="hibernate.connection.useUnicode" value="true" />
<property name="hibernate.connection.characterEncoding" value="UTF-8" />
<property name="hibernate.connection.charSet" value="UTF-8" />
<property name="hibernate.connection.url" value="jdbc:postgresql://localhost:5432/mydb" />
<property name="hibernate.connection.username" value="myuser" />
<property name="hibernate.connection.password" value="mypass" />
<property name="hibernate.show_sql" value="true" />
<property name="hibernate.hbm2ddl.auto" value="validate" />
</properties>
</persistence-unit>
</persistence>
The first is the 'default' unit. It's used by the standard entity manager. The second is needed for running JUnit tests outside of a Java EE environment. The third one is used for logging to be independent from JTA transactions.
This works. But when I start Wildfly, I even get some of these errors (although I don't use H2 in my application):
21:32:33,748 ERROR [org.hibernate.tool.hbm2ddl.SchemaValidator] (ServerService Thread Pool -- 51) HHH000319: Could not get database metadata: org.h2.jdbc.JdbcSQLException: Table "PG_CLASS" not found; SQL statement:
select relname from pg_class where relkind='S' [42102-173]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:331)
It only happens when the application is deployed.
The idea was to disable or remove the ExampleDS by admin console or in standalone.xml, but when I do that, I get a startup with errors:
21:36:20,992 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) JBAS014613: Operation ("deploy") failed - address: ([("deployment" => "com.zonacroft.mycuisine.webserver-TRUNK.war")]) - failure description: {"JBAS014771: Services with missing/unavailable dependencies" => [
"jboss.persistenceunit.\"com.mydomain.myapp.webserver-TRUNK.war#MyLoggingUnit\".__FIRST_PHASE__ is missing [jboss.data-source.java:jboss/datasources/ExampleDS]",
"jboss.persistenceunit.\"com.mydomain.myapp.webserver-TRUNK.war#MyPersistenceTestUnit\".__FIRST_PHASE__ is missing [jboss.data-source.java:jboss/datasources/ExampleDS]"
What on earth is going on here? Why does this persistence.xml need the exampleDS? Are the RESOURCE_LOCAL persistence units maybe wrong configured? (But if so, why do they work then). So what's the problem here?
[UPDATE]
I figured out that I don't get startup errors (with exampleDS enabled) when I remove the hibernate.hbm2ddl.auto properties from the RESOURCE_LOCAL persistence units. But it annoys me that I have to let the exampleDS of Wildfly enabled. Otherwise Wildfly would not start with the application as described above. Why is this so. What's wrong here?
You only define a datasource for the first persistence unit:
<jta-data-source>java:jboss/datasources/myDS</jta-data-source>
That means WildFly uses the default datasource exampleDS for your other persistence units.
This causes the exception, since the configured PostgreSQL dialect does not work for the default H2 datasource.
I am searching for a solution, to use Spring (V1.3.2) and NHibernate (V3.2.0) together with the declarative transactionmanagement of Spring to communicate with two independent SQLite database instances.
Currently I can read and write from/to both database instances but the transaction management only works for one database (DbProvider_DB1).
The „why“ is clear for me, but how can I use the declarative transaction management for both databases? Do I need two transaction manager? If yes, how can I define a second one and use it?
Here is my configuration, nothing strange but for the sake of completeness:
dao.xml
<tx:attribute-driven />
<!-- Datenbankprovider -->
<db:provider id="DbProvider_DB1" provider="SQLite-1.0.72" connectionString="Data Source=db1.db3;Version=3;New=False;" />
<db:provider id="DbProvider_DB2" provider="SQLite-1.0.72" connectionString="Data Source=db2.db3;Version=3;New=False;" />
<!-- SessionFactories -->
<object id="SessionFactory" abstract="true" type="Spring.Data.NHibernate.LocalSessionFactoryObject, Spring.Data.NHibernate32">
<property name="HibernateProperties">
<dictionary>...</dictionary>
</property>
<property name="ExposeTransactionAwareSessionFactory" value="true" />
</object>
<object id="SessionFactory_DB1" parent="SessionFactory" >
<property name="DbProvider" ref="DbProvider_DB1" />
</object>
<object id="SessionFactory_DB2" parent="SessionFactory" >
<property name="DbProvider" ref="DbProvider_DB2" />
</object>
<!-- Transactionmanager -->
<object id="transactionManager" type="Spring.Data.NHibernate.HibernateTransactionManager, Spring.Data.NHibernate32">
<property name="DbProvider" ref="DbProvider_DB1"/>
<property name="SessionFactory" ref="SessionFactory_DB1"/>
<property name="TransactionSynchronization" value="Always"/>
</object>
<!-- Data Access Objects -->
<object id="Dao_DB1" type="Dao1, Dao">
<property name="SessionFactory" ref="SessionFactory_DB1" />
</object>
<object id="Dao_DB2" type="Dao2, Dao">
<property name="SessionFactory" ref="SessionFactory_DB2" />
</object>
Dao
[Transaction]
public TEntity Save( TEntity entity )
{
CurrentSession.Save( entity );
return entity;
}
Thanx
The solution is to use the TxScopeTransactionManager instaed of HibernateTransactionManager.
<object id="transactionManager" type="Spring.Data.Core.TxScopeTransactionManager, Spring.Data">
<property name="TransactionSynchronization" value="Always"/>
</object>
I know that "GtK-glade" got many convinent sample GUI frame like Management UI, there are many samples using the template of Glade's inside tool, like buttons, menus, label.
But I had like to use my own frame of GUI to be costumerized for users.And I just can't find a way to load my own "image" of frame from the "Glade" tool.
By What method can I let my one "image" of frame to replace the sample frame of "Glade" tool?
Or by what kind of "GtK" glade-like tooling can do this job?
I use c souce code of Ubuntu linux. And I can't find an toolkit to update my original souce code of GUI. I only find that GTK-glade can open it .
int
main (int argc, char *argv[])
..........
GtkImage *image = NULL;
image = glade_xml_get_widget (gxml, "image1");
gtk_image_set_from_file(image,"tux.png");
my glade xml file is:
<?xml version="1.0"?>
<glade-interface>
<!-- interface-requires gtk+ 2.6 -->
<!-- interface-naming-policy toplevel-contextual -->
<widget class="GtkWindow" id="window1">
<property name="visible">True</property>
<property name="border_width">10</property>
<property name="title" translatable="yes">window1</property>
<property name="default_width">800</property>
<property name="default_height">480</property>
<signal name="destroy" handler="on_window1_destroy"/>
<child>
<widget class="GtkVBox" id="vbox2">
<property name="visible">True</property>
<property name="spacing">2</property>
<child>
<widget class="GtkEntry" id="entry1">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">â</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<widget class="GtkButton" id="button1">
<property name="label" translatable="yes">Hello</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<signal name="clicked" handler="on_button1_clicked"/>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="label" translatable="yes">label</property>
</widget>
<packing>
<property name="position">2</property>
</packing>
</child>
<child>
<widget class="GtkImage" id="image1">
<property name="visible">True</property>
<property name="stock">gtk-missing-image</property>
</widget>
<packing>
<property name="position">3</property>
</packing>
</child>
</widget>
</child>
</widget>
</glade-interface>