[Kde-bindings] [Bug 250969] New: Qyoto's uics generates incorrect code for QFormLayout

Pete 1 at 234.cx
Sun Sep 12 12:09:03 UTC 2010


https://bugs.kde.org/show_bug.cgi?id=250969

           Summary: Qyoto's uics generates incorrect code for QFormLayout
           Product: bindings
           Version: unspecified
          Platform: Ubuntu Packages
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: general
        AssignedTo: kde-bindings at kde.org
        ReportedBy: 1 at 234.cx


Version:           unspecified (using KDE 4.5.1) 
OS:                Linux

I have created a form in Qt Designer with two rows.  Each row has a QLabel on
the left, and a QLineEdit box on the right.  If I arrange these using
QGridLayout, everything works as expected.  If I use QFormLayout, two problems
occur:

1.  If I ask for a preview of the window in Qt Designer, the labels are shown
on the left and the fields on the right, as expected.  However, when I compile
using uics and display the form in my c# application, the fields are shown
underneath the labels.  It looks as though the layoutRowWrapPolicy is getting
set to WrapAllRows, even though Qt Designer claims that the policy is
DontWrapRows.

2.  To try and work around this, I set the layoutRowWrapPolicy to WrapAllRows,
then back to DontWrapRows.  Unfortunately this makes the problem worse.  Uics
now generates c# code that doesn't compile, in particular this line:

formLayout.RowWrapPolicy = QFormLayout.RowWrapPolicy.DontWrapRows;

Presumably this should be:

formLayout.rowWrapPolicy = QFormLayout.RowWrapPolicy.DontWrapRows;

This compiles although problem 1 still occurs.

(BTW, this test was done with the Ubuntu Maverick beta, hence the odd
combination of Ubuntu and KDE 4.5.1.)

Reproducible: Always

Steps to Reproduce:
1.  Create form in Qt Designer with two rows, arranged using QFormLayout.
2.  Compile the form using uics.
3.  Use MonoDevelop to create an application which displays the form.
4.  Run application.
5.  Set layoutRowWrapPolicy to WrapAllRows, then back to DontWrapRows.
6.  Compile the form using uics.
7.  Run application.


Actual Results:  
At step 4, fields will be displayed underneath labels.  At step 7, a compile
error will occur.

Expected Results:  
At step 4, fields should be displayed to the right of the labels.  At step 7
the uics-generated code should compile without errors.

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the Kde-bindings mailing list