Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. PySide2-uic how to specify the package from which to import resource file
Forum Updated to NodeBB v4.3 + New Features

PySide2-uic how to specify the package from which to import resource file

Scheduled Pinned Locked Moved Unsolved Qt for Python
2 Posts 2 Posters 1.4k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Offline
    I Offline
    IrakozeFD
    wrote on last edited by
    #1

    HI,

    I am having resource file import error in py files generated with PySide2-uic. These errors are due to my project organization (in many folders), the ui files are organized in many folders and the resource file is in its folder also.

    When generating py files using PySide2-uic, is there any way to specify the package from which to import the resource file generated by PySide2-rcc?

    If you know pyuic5, a module that generates py files (using another Qt 5 python bindings: PyQt5) from ui files , this option is called "--import-from" and the command to generate py files is : pyuic5 --import-from=PACKAGE_NAME "ui_file_name" -o "py_file_name"
    Here PACKAGE_NAME is the package which contains the resource file.

    With PySide-uic the only option i saw is "--from-imports" and this one suppose that the resource file and the ui_files are in the same package, which is not true in my case.

    Is there any workaround or solution for my issue?

    Thank you for your help,

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      As a workaround, you should be able to use the code generated by pyuic5 with the Qt imports needing to be updated.

      For the missing feature(s), you should open a feature request on the bug report system.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved