0

For example, I have a project Numerator having two files:

  • Numerator\program.py
  • Numerator\Interface\paperCounter.ui

In the program.py I define a custom class MouseTrackingList based on QListWidget. I use Qt Designer to generate user interface and to use it with uic.loadUiType in my program.py.

The problem is how to properly promote example QListWidget in Qt Designer. When I do right mouse click "promote to" and select name of promoted class MouseTrackingList it automatically creates name of header file mousetrackinglist.h. Then I press "add" and "promote".

From this answer I see Header file must be the python import path for the module that contains this class. But I cannot understand where my mousetrackinglist.h is generated and how to import him in program.py.

Colder
  • 13
  • 2
  • Please read the answer more carefully. There is no header file. All you need to do is change *mousetrackinglist.h* in the Promote To dialog to the python package path where the `MouseTrackingList` class is located (e.g. "mypackage.program", or whatever). The correct import statement will be generated automatically. – ekhumoro Apr 14 '19 at 14:17
  • Thanks! I finally got what you meant there. – Colder Apr 14 '19 at 16:50

0 Answers0