Hi,
unfortunately the failure was caused by my slappy coding, I made a
connection which was causing the chaotic behaviour:
"actionMono.toggled.connect(actionStereo, "toggle()");" before I
actually thought to combine the two actions into a group and forgot
about it afterwards.
Nevermind, it works fine. False alarm, sorry.
Dawid
> Dawid Sip wrote:
>> public void mm(){
>> gr = new QActionGroup(this);
>>
>> mono_stereoGroup.addAction(ui.action_Stereo);
>> mono_stereoGroup.addAction(ui.action_Mono);
>> //ui.toolBar.addActions(gr.actions());
>> }
>> "
>> where as you can see I create a group and add the two actions that I
>> created in with the Designer and which declarations are in
>> Ui_blahblah.java.
>>
>> The problem now is that the behavior is not what you'd expect from a
>> group, when one is checked the other is also checked sometimes, ore
>> none is chcecked, or in some constelation it is even right.. Does
>> someone know what could be causing this chaotic behaviour?
>>
>
> Hi, Dawid.
>
> I'm not able to reproduce your problem on Windows with either the Qt
> Jambi 4.4.0_01 preview or Qt Jambi 4.3.4_01. Attached to this mail are
> the files I used for testing.
>
> Could you check if these files illustrate the problem on your end, and
> if not, alter them to show the problem?
>
> If the issue is indeed present in this example as well, could you
> please let me know what platform, version of Java and version of Qt
> Jambi you are using?
>
> -- Eskil
>
>
> ------------------------------------------------------------------------
>
> import com.trolltech.qt.core.*;
> import com.trolltech.qt.gui.*;
>
> public class MyMainWindow extends QMainWindow {
> Ui_MainWindow ui = new Ui_MainWindow();
>
> public MyMainWindow() {
>
> ui.setupUi(this);
>
> QActionGroup gr = new QActionGroup(this);
>
> gr.addAction(ui.actionStereo);
> gr.addAction(ui.actionMono);
>
> }
>
> public static void main(String args[]) {
> QApplication.initialize(args);
>
> MyMainWindow myMainWindow = new MyMainWindow();
> myMainWindow.show();
>
> QApplication.exec();
> }
>
> }
>
> ------------------------------------------------------------------------
>
> <ui version="4.0" language="jambi" >
> <class>MainWindow</class>
> <widget class="QMainWindow" name="MainWindow" >
> <property name="geometry" >
> <rect>
> <x>0</x>
> <y>0</y>
> <width>800</width>
> <height>600</height>
> </rect>
> </property>
> <property name="windowTitle" >
> <string>MainWindow</string>
> </property>
> <widget class="QWidget" name="centralwidget" >
> <layout class="QGridLayout" />
> </widget>
> <widget class="QMenuBar" name="menubar" >
> <property name="geometry" >
> <rect>
> <x>0</x>
> <y>0</y>
> <width>800</width>
> <height>21</height>
> </rect>
> </property>
> <widget class="QMenu" name="menuFile" >
> <property name="title" >
> <string>File</string>
> </property>
> <addaction name="actionStereo" />
> <addaction name="actionMono" />
> </widget>
> <addaction name="menuFile" />
> </widget>
> <widget class="QStatusBar" name="statusbar" />
> <widget class="QToolBar" name="toolBar" >
> <property name="windowTitle" >
> <string>toolBar</string>
> </property>
> <attribute name="toolBarArea" >
> <enum>TopToolBarArea</enum>
> </attribute>
> <attribute name="toolBarBreak" >
> <bool>false</bool>
> </attribute>
> <addaction name="actionStereo" />
> <addaction name="actionMono" />
> </widget>
> <action name="actionStereo" >
> <property name="checkable" >
> <bool>true</bool>
> </property>
> <property name="checked" >
> <bool>false</bool>
> </property>
> <property name="text" >
> <string>Stereo</string>
> </property>
> </action>
> <action name="actionMono" >
> <property name="checkable" >
> <bool>true</bool>
> </property>
> <property name="text" >
> <string>Mono</string>
> </property>
> </action>
> </widget>
> <resources/>
> <connections/>
> </ui>
>
_______________________________________________
Qt-jambi-interest mailing list
[email protected]
http://lists.trolltech.com/mailman/listinfo/qt-jambi-interest