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. Organizing Pyside2 Code

Organizing Pyside2 Code

Scheduled Pinned Locked Moved Solved Qt for Python
pyside2qt for python
2 Posts 2 Posters 558 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.
  • A Offline
    A Offline
    Abdulrahman
    wrote on last edited by
    #1

    Hi All,
    I need to organize files in subdirectories. but when i try to add new directory to main.pyproject file, it doesn't give access to its sub qml files.

    7f7aa882-bc34-40ef-8ebd-55a9d2de099e-image.png
    So how can i make subfolders containing components that can be used in main.qml ??

    1 Reply Last reply
    0
    • Volodymyr14V Offline
      Volodymyr14V Offline
      Volodymyr14
      wrote on last edited by
      #2

      Need to organize main.qml file that imports nested files of subdirectories. If you have in main.qml:
      import "qmlFiles" as Uqmls
      then inside qmlFiles/ directory you have some.qml file and qmlDir, then there inside this file:
      import "qmlDir" as UDir
      Is better to organize by this way:

      1. dir/ of your main.qml file.
      2. dir/subdir/ for import from main.qml file
      3. dir/subdir/subdir/ for import from files that are in the dir/subdir/

      PyQt/PySide

      1 Reply Last reply
      1

      • Login

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