0

For context I created a Row of two radio buttons, which worked perfect but I wanted to create a custom radio button component to reduce code, and when I did the Row doesnt even see the custom radio button as its child for some reason, any idea why ? Here is part of the code

Row{
    spacing: 70
    id: row
Components.MyRadioButton{
    id: rb2
    pText: "male"
    pColor: "gray"
    pPixelSize: 20
}

Rectangle{
    width:100
    height: 100
    color: "yellow"
}
Rectangle{
    width:100
    height: 100
    color: "red"
}
}
  • 1
    Probably your component doesn't define its size. But it's hard to say without seeing the component code. – folibis Feb 20 '22 at 11:32
  • 1
    Please provide a [mre]. – JarMan Feb 21 '22 at 13:48
  • Indeed, please post a more complete example. for instance, do you have any import statements? Do you import the `Components` by the way? You would also have to make your types under `Components` (such as `MyRadioButton`) available in QML. – andrgolubev Feb 22 '22 at 16:34

0 Answers0