From ros-sig-gui-bounces@code.ros.org  Thu Nov  3 12:20:38 2011
Return-Path: <ros-sig-gui-bounces@code.ros.org>
X-Original-To: www-data@code.ros.org
Delivered-To: www-data@code.ros.org
Received: from pub5.willowgarage.com (localhost [127.0.0.1])
	by pub5.willowgarage.com (Postfix) with ESMTP id 983DA6814A;
	Thu,  3 Nov 2011 12:20:38 -0700 (PDT)
X-Original-To: ros-sig-gui@code.ros.org
Delivered-To: ros-sig-gui@code.ros.org
Received: from mail-vw0-f46.google.com (mail-vw0-f46.google.com
	[209.85.212.46])
	by pub5.willowgarage.com (Postfix) with ESMTPS id 7FA4268149
	for <ros-sig-gui@code.ros.org>; Thu,  3 Nov 2011 12:20:35 -0700 (PDT)
Received: by vws1 with SMTP id 1so1501903vws.5
	for <ros-sig-gui@code.ros.org>; Thu, 03 Nov 2011 12:20:33 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=mime-version:in-reply-to:references:from:date:message-id:subject:to
	:cc:content-type;
	bh=tIVWiVU+KZDjn6VMCl0eoSLHVWRqxtnaV/tTByXAkHw=;
	b=ZL+Xi7zCIE5Bw3GaYuMyw8zGO9DFjOJs1Q7m00Zws49RW2tROzwC4QDNkzi3K78o53
	UO5iYuhIbpndTBsKEG86cCHPi4QkXvCMRWKQZ5IprWIyO41Ec7hcuUNAgTbhCs80/sek
	ubZnpbaTuJct/tHnYkpyRZl7++yIDOWUMs/lw=
Received: by 10.52.21.83 with SMTP id t19mr11041781vde.88.1320348033112; Thu,
	03 Nov 2011 12:20:33 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.220.183.5 with HTTP; Thu, 3 Nov 2011 12:20:02 -0700 (PDT)
In-Reply-To: <4EB282BC.6020109@sim.tu-darmstadt.de>
References: <CADiqiTx+1mZM7Vx27KZT_hVYj=+y3Q29bFqJGGmPRPXbP0WuoA@mail.gmail.com>
	<4EB1DD32.2030303@dirk-thomas.net>
	<CADiqiTxmLS=RaD0tsU75zEAWag7m5w1F1E=gYPjR7yhrkOZ8Wg@mail.gmail.com>
	<4EB282BC.6020109@sim.tu-darmstadt.de>
From: William Woodall <wjwwood@gmail.com>
Date: Thu, 3 Nov 2011 14:20:02 -0500
Message-ID: <CADiqiTyt4L20ocCLM0CNF-hK9Q5CxjTnhUoerznsMBfZnxxtFg@mail.gmail.com>
To: Dorian Scholz <scholz@sim.tu-darmstadt.de>
Cc: ros-sig-gui@code.ros.org
Subject: Re: [Ros-sig-gui] Generating python files from ui files
X-BeenThere: ros-sig-gui@code.ros.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <ros-sig-gui.code.ros.org>
List-Unsubscribe: <https://code.ros.org/mailman/options/ros-sig-gui>,
	<mailto:ros-sig-gui-request@code.ros.org?subject=unsubscribe>
List-Archive: </lurker/list/ros-sig-gui.html>
List-Post: <mailto:ros-sig-gui@code.ros.org>
List-Help: <mailto:ros-sig-gui-request@code.ros.org?subject=help>
List-Subscribe: <https://code.ros.org/mailman/listinfo/ros-sig-gui>,
	<mailto:ros-sig-gui-request@code.ros.org?subject=subscribe>
Content-Type: multipart/mixed; boundary="===============5538179950629431954=="
Sender: ros-sig-gui-bounces@code.ros.org
Errors-To: ros-sig-gui-bounces@code.ros.org

--===============5538179950629431954==
Content-Type: multipart/alternative; boundary=20cf307d00b67e5ad904b0d97b8c

--20cf307d00b67e5ad904b0d97b8c
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Thanks, I will keep those things in mind.

--

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
William Woodall
Graduate Software Engineering
Auburn University
w@auburn.edu
wjwwood@gmail.com
williamjwoodall.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



On Thu, Nov 3, 2011 at 7:02 AM, Dorian Scholz <scholz@sim.tu-darmstadt.de>w=
rote:

>  As the QUiLoader in PySide is somewhat buggy, especially with
> custom/promoted widgets, I would recommend using the QtBindingHelper.py
> from rosgui, or at least the loadUi function implemented therein.
> Using the binding helper makes your software agnostic of the actual
> binding used, so you can easily switch between PySide and PyQt, which
> sometimes helps in finding bugs that are actually in PySide and not in yo=
ur
> own code...
> All you have to do is import QtBindingHelper before importing any Qt stuf=
f:
>
> from QtBindingHelper import loadUi
> import QtCore
> from QtGui import QWidget
>
> It will try to use PyQt and fall back to PySide automatically if necessar=
y.
> But you can also force it to use only one of them by editing the binding
> list, or setting a property on the sys module before importing the bindin=
g
> helper:
>
> import sys
> setattr(sys, 'SELECT_QT_BINDING', 'pyside')
>
> Cheers,
> Dorian
>
>
> On 11/03/2011 01:22 AM, William Woodall wrote:
>
> Ah, I don't know why I didn't think about something like QUiLoader...  Ma=
n
> I feel silly, I guess I have been just using the script to generate the p=
y
> files because that is how they do it in many of the tutorials.
>
>  I have worked with the cmake macros for generating headers from ui files
> in c++, but I guess I was expecting something similar for python.  This
> makes way more sense.
>
>  Thanks,
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> William Woodall
> Graduate Software Engineering
> Auburn University
> w@auburn.edu
> wjwwood@gmail.com
> williamjwoodall.com
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
>
>
> On Wed, Nov 2, 2011 at 7:15 PM, Dirk Thomas <mail@dirk-thomas.net> wrote:
>
>>  Have you found a good way to automatically generate py files from ui
>>> files using pyqt and/or pyside inside a ros build system?
>>>
>>> It looks like ros_gui isn't currently, but I was wondering if you had
>>> any leads.  I am working on a project that uses pyside and I wanted to
>>> generate them at build time rather than committing the
>>> generated file.
>>>
>>
>>  I am not sure why you would generate any code for UI files in Python.
>> In Python plugins you can just load the UI file at runtime (no need for
>> any generated files)??
>>
>> For C++ plugins you will include your UI files in the cmake files and th=
e
>> generated code will be included in the library.
>>
>> Dirk
>> _______________________________________________
>> Ros-sig-gui mailing list
>> Ros-sig-gui@code.ros.org
>> https://code.ros.org/mailman/listinfo/ros-sig-gui
>>
>
>
>
> _______________________________________________
> Ros-sig-gui mailing listRos-sig-gui@code.ros.orghttps://code.ros.org/mail=
man/listinfo/ros-sig-gui
>
>
>
> --
> Dipl.-Inform. Dorian Scholz         E-Mail:scholz(at)sim.tu-darmstadt.de
> Simulation, Systems Optimization    Phone:  +49 (0) 6151 16-4811
> and Robotics Group                  Fax:    +49 (0) 6151 16-6648
> Technische Universit=E4t Darmstadt    http://www.sim.tu-darmstadt.de
> Hochschulstr. 10                    D-64289 Darmstadt, Germany
>
>
> _______________________________________________
> Ros-sig-gui mailing list
> Ros-sig-gui@code.ros.org
> https://code.ros.org/mailman/listinfo/ros-sig-gui
>
>

--20cf307d00b67e5ad904b0d97b8c
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Thanks, I will keep those things in mind.<div><br></div><div>--</div><div><=
br clear=3D"all">~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>William Woodall<br>Grad=
uate Software Engineering<br>Auburn University<br><a href=3D"mailto:w@aubur=
n.edu" target=3D"_blank">w@auburn.edu</a><br>

<a href=3D"mailto:wjwwood@gmail.com" target=3D"_blank">wjwwood@gmail.com</a=
><div><a href=3D"http://williamjwoodall.com" target=3D"_blank">williamjwood=
all.com</a><br>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</div><br>
<br><br><div class=3D"gmail_quote">On Thu, Nov 3, 2011 at 7:02 AM, Dorian S=
cholz <span dir=3D"ltr">&lt;<a href=3D"mailto:scholz@sim.tu-darmstadt.de">s=
cholz@sim.tu-darmstadt.de</a>&gt;</span> wrote:<br><blockquote class=3D"gma=
il_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-lef=
t:1ex;">


 =20
   =20
 =20
  <div bgcolor=3D"#FFFFFF" text=3D"#000000">
    As the QUiLoader in PySide is somewhat buggy, especially with
    custom/promoted widgets, I would recommend using the
    QtBindingHelper.py from rosgui, or at least the loadUi function
    implemented therein.<br>
    Using the binding helper makes your software agnostic of the actual
    binding used, so you can easily switch between PySide and PyQt,
    which sometimes helps in finding bugs that are actually in PySide
    and not in your own code...<br>
    All you have to do is import QtBindingHelper before importing any Qt
    stuff:<br>
    <tt><br>
      from QtBindingHelper import loadUi<br>
      import QtCore<br>
      from QtGui import QWidget</tt><br>
    <br>
    It will try to use PyQt and fall back to PySide automatically if
    necessary.<br>
    But you can also force it to use only one of them by editing the
    binding list, or setting a property on the sys module before
    importing the binding helper:<br>
    <tt><br>
      import sys<br>
      setattr(sys, &#39;SELECT_QT_BINDING&#39;, &#39;pyside&#39;)<br>
    </tt><br>
    Cheers,<br>
    Dorian<div><div class=3D"h5"><br>
    <br>
    On 11/03/2011 01:22 AM, William Woodall wrote:
    <blockquote type=3D"cite">Ah, I don&#39;t know why I didn&#39;t think a=
bout something
      like QUiLoader... =A0Man I feel silly, I guess I have been just
      using the script to generate the py files because that is how they
      do it in many of the tutorials. =A0
      <div>
        <br>
      </div>
      <div>I have worked with the cmake macros for generating headers
        from ui files in c++, but I guess I was expecting something
        similar for python. =A0This makes way more sense.</div>
      <div><br>
      </div>
      <div>Thanks,</div>
      <div>
        <br clear=3D"all">
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>
        William Woodall<br>
        Graduate Software Engineering<br>
        Auburn University<br>
        <a href=3D"mailto:w@auburn.edu" target=3D"_blank">w@auburn.edu</a><=
br>
        <a href=3D"mailto:wjwwood@gmail.com" target=3D"_blank">wjwwood@gmai=
l.com</a>
        <div>
          <a href=3D"http://williamjwoodall.com" target=3D"_blank">williamj=
woodall.com</a><br>
          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</div>
        <br>
        <br>
        <br>
        <div class=3D"gmail_quote">On Wed, Nov 2, 2011 at 7:15 PM, Dirk
          Thomas <span dir=3D"ltr">&lt;<a href=3D"mailto:mail@dirk-thomas.n=
et" target=3D"_blank">mail@dirk-thomas.net</a>&gt;</span>
          wrote:<br>
          <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;bord=
er-left:1px #ccc solid;padding-left:1ex">
            <div>
              <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;=
border-left:1px #ccc solid;padding-left:1ex">
                Have you found a good way to automatically generate py
                files from ui files using pyqt and/or pyside inside a
                ros build system?<br>
                <br>
                It looks like ros_gui isn&#39;t currently, but I was
                wondering if you had any leads. =A0I am working on a
                project that uses pyside and I wanted to generate them
                at build time rather than committing the<br>
                generated file.<br>
              </blockquote>
              <br>
            </div>
            I am not sure why you would generate any code for UI files
            in Python.<br>
            In Python plugins you can just load the UI file at runtime
            (no need for any generated files)??<br>
            <br>
            For C++ plugins you will include your UI files in the cmake
            files and the generated code will be included in the
            library.<br>
            <br>
            Dirk<br>
            _______________________________________________<br>
            Ros-sig-gui mailing list<br>
            <a href=3D"mailto:Ros-sig-gui@code.ros.org" target=3D"_blank">R=
os-sig-gui@code.ros.org</a><br>
            <a href=3D"https://code.ros.org/mailman/listinfo/ros-sig-gui" t=
arget=3D"_blank">https://code.ros.org/mailman/listinfo/ros-sig-gui</a><br>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset></fieldset>
      <br>
      <pre>_______________________________________________
Ros-sig-gui mailing list
<a href=3D"mailto:Ros-sig-gui@code.ros.org" target=3D"_blank">Ros-sig-gui@c=
ode.ros.org</a>
<a href=3D"https://code.ros.org/mailman/listinfo/ros-sig-gui" target=3D"_bl=
ank">https://code.ros.org/mailman/listinfo/ros-sig-gui</a>
</pre>
    </blockquote>
    <br>
    <br>
    </div></div><span class=3D"HOEnZb"><font color=3D"#888888"><pre cols=3D=
"72">--=20
Dipl.-Inform. Dorian Scholz         E-Mail:scholz(at)<a href=3D"http://sim.=
tu-darmstadt.de" target=3D"_blank">sim.tu-darmstadt.de</a>
Simulation, Systems Optimization    Phone:  +49 (0) 6151 16-4811
and Robotics Group                  Fax:    +49 (0) 6151 16-6648
Technische Universit=E4t Darmstadt    <a href=3D"http://www.sim.tu-darmstad=
t.de" target=3D"_blank">http://www.sim.tu-darmstadt.de</a>
Hochschulstr. 10                    D-64289 Darmstadt, Germany</pre>
  </font></span></div>

<br>_______________________________________________<br>
Ros-sig-gui mailing list<br>
<a href=3D"mailto:Ros-sig-gui@code.ros.org">Ros-sig-gui@code.ros.org</a><br=
>
<a href=3D"https://code.ros.org/mailman/listinfo/ros-sig-gui" target=3D"_bl=
ank">https://code.ros.org/mailman/listinfo/ros-sig-gui</a><br>
<br></blockquote></div><br></div>

--20cf307d00b67e5ad904b0d97b8c--

--===============5538179950629431954==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Ros-sig-gui mailing list
Ros-sig-gui@code.ros.org
https://code.ros.org/mailman/listinfo/ros-sig-gui

--===============5538179950629431954==--

