-1

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

Ferrari
  • 75
  • 1
  • 11
  • 1
    You will need to show your minimal code for this. I expect the problem is with your layouts. – drescherjm Sep 20 '18 at 16:06
  • Can you show "The Object Inspector"? Did you try to delete the build directory and rebuild the project? – FrozenM Sep 20 '18 at 16:15
  • You can fownload the complete source code (just 51Kb) from the following link: [https://drive.google.com/file/d/10VA9ORAzKgDCzIpD0OC5p27K6by5seh9/view?usp=sharing] – Ferrari Sep 20 '18 at 16:16
  • @FrozenM I removed the build directory and I recompiled the software but the problem still remains ... – Ferrari Sep 20 '18 at 16:21

1 Answers1

1

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.

FrozenM
  • 115
  • 1
  • 3
  • SOLVED!! It works!! thank you very much!. But is it a QT Creator bug ? Is it fixed in a new release ? – Ferrari Sep 21 '18 at 07:26