Discussion:
Designer: Buddy checkbox disables OK button?
Stephen Chu
2012-07-23 17:54:30 UTC
Permalink
I was adding rows to a form layout and find that once I checked the
Buddy checkbox, the OK button became disabled:

Loading Image...

Is this intended? How do I set the pair to be buddies then?

This is with Creator 2.5.1 built from git pull on OS X 10.7.4.
Moritz Gellner
2012-07-24 10:43:54 UTC
Permalink
Hi Stephen,

I assume this behaviour is intended, as QTextEdit's can't actually
*have* a buddy, they can only *be* a buddy - more specifically, they
are usually the buddy of either a QLabel or something derived from it.
See http://qt-project.org/doc/qt-5.0/designer-buddy-mode.html for a
good explanation of how to link a label to its buddy. Programatically,
you could also use QLabel::setBuddy(QWidget*).

Perhaps the "buddy" checkbox in the dialog should be disabled in the
first place though if the item being edited is not a QLabel?

Cheers,
Moritz

PS: This is my first response to the mailing list, so I'm not sure if
this is the correct way to reply... sorry if I should have done it
differently.
--
Moritz J. Gellner
Northwestern University, '14
Economics & Computer Science
Stephen Chu
2012-07-24 16:18:24 UTC
Permalink
Post by Stephen Chu
I was adding rows to a form layout and find that once I checked the
http://i.imgur.com/j6cth.png
Is this intended? How do I set the pair to be buddies then?
This is with Creator 2.5.1 built from git pull on OS X 10.7.4.
So I figured out that this is a Designer issue, not Creator since
Creator only builds a plugin that load Designer. Cross over to
development list.

After diving into Designer source, I find out I need the have a
so-called "buddy marker" which is a '&' in the label text. After
including that, the buddy checkbox automatically checked.

I can't find any mention of the "buddy mark" anywhere. Why do we need
that in the label? And why does buddy check rely on it? I can still
specify buddy relation with buddy edit mode WITHOUT the marker in the
label. So why is it required?

And if it's required for good reason, the buddy check box should be
disable since it's always linked to the existence of the marker.
Stephen Chu
2012-07-23 17:43:41 UTC
Permalink
I was adding rows to a form layout and find that once I checked the
Buddy checkbox, the OK button became disabled:

http://i.imgur.com/j6cth.png

Is this intended? How do I set the pair to be buddies then?

This is with Creator 2.5.1 built from git pull on OS X 10.7.4.

Loading...