Custom widget in QGroupBox
-
Hi
I created my own class IPComboBox which inherits from the class QComboBox. But when i tried to add to QGroupBox then the Widget while the app is running is not in the grid. In Desigher it shows me the following icon:

How could i fix it? Casual QComboBox works well.
-
Hi
I created my own class IPComboBox which inherits from the class QComboBox. But when i tried to add to QGroupBox then the Widget while the app is running is not in the grid. In Desigher it shows me the following icon:

How could i fix it? Casual QComboBox works well.
@Creatorczyk said in Custom widget in QGroupBox:
But when i tried to add to QGroupBox then the Widget while the app is running is not in the grid
Do you mean you have runtime code to create an instance of your widget and add it somewhere? In which case show your code.
-
Hi
I created my own class IPComboBox which inherits from the class QComboBox. But when i tried to add to QGroupBox then the Widget while the app is running is not in the grid. In Desigher it shows me the following icon:

How could i fix it? Casual QComboBox works well.
Just a guess from looking at the image:
It looks like you madeIpComboBoxaQGroupBox. AQComboBoxsubclass widget wouldn't have it's own layout.
If you want yourIpComboBoxin yourQGroupBox, create a box, move a regular comboBox in there and promote this widget to yourIpComboBoxcode/class