-2

I'm working on an application which uses QtDesigner for part of its UI. QtDesigner .ui files are generally compiled to a .h representation that you can access from the rest of your QT code. For the most part it works, widgets that are laid out show pointers to widgets of the same type in code, but for certain elements (particularly QGroupBox) the generated ui code shows the QGroupBox objects as int *. I can access the contents of the QGroupBox normally by using qobject_cast<QGroupBox *> but I find it odd that it's not necessary for other UI elements that I need access to.

Is this the normal behavior for QGroupBox elements or any other QtDesigner widgets/layouts? Or am I doing something wrong?

TheYokai
  • 341
  • 5
  • 10
  • 1
    you could explain yourself better, because you point out that an `int *` is generated when you use `QGroupBox`, I just reviewed and generates `QGroupBox *` in `ui_xxx.h` – eyllanesc Sep 24 '18 at 04:22
  • 1
    agree with @eyllanesc, please provide a https://stackoverflow.com/help/mcve. If it really occurs it sounds like a Qt bugs anyway – sandwood Sep 24 '18 at 07:12

1 Answers1

0

So I'm going to chalk this up to a minor bug. Changing my build directory in project settings to something different and then back helped QT Creator find the proper type for the added UI elements.

TheYokai
  • 341
  • 5
  • 10