qradiobuttions are not visible

115 views Asked by At

I developed a very simple qt application by using qt creator 4.6 on Mac (MacOs HighSierra Ver. 10.13.6 (17G65)). The application has a main window, a label with a picture and two radio button groups.

enter image description here

I compile and launch the program but only one radio button group is visible.... very strange.

enter image description here

I supposed that one radio button group is on the back of the picture so I sent to back the picture and put in front the radio button group but the result is the same.
Did you have any similar problem ? How did you fix it ? Thank you very much for your help regards

1

There are 1 answers

1
FrozenM On BEST ANSWER

So... You have wrong ui form :) You have 2 widgets with the same name "layoutWidget". To fix it:

  1. Close your project.

  2. Open your ui file in text editor.

  3. Rename layoutWidget(second (50 str)) to layoutWidget_2 (for example):

to

<widget class="QWidget" name="layoutWidget_2">
  1. Open your project.

  2. Right click on "label" (ui form) in "The Object Inspector" select "move back".

The problem is that for objects with the same names, zorder does not work as it should. The compiler automatically renames objects with the same names (the first one leaves with the same name, and the second, third, etc. calls it differently). But in zorder there are old names (not renamed).

PS. Sorry for my English.