Skip to content

Qt for Python

For discussion and questions about Qt for Python (PySide & Shiboken)

3.3k Topics 14.4k Posts
QtWS25 Last Chance
  • Error in exe file

    Unsolved
    3
    0 Votes
    3 Posts
    178 Views
    JonBJ
    @Mahdi_2020 said in Error in exe file: IndexError: list index out of range line338: root_object = engine.rootObjects()[0] engine.rootObjects() is not an array or, more likely, is an empty array so [0] is out of range. If it works under Creator but not outside then presumably creating the engine/objects fails outside because something is not set up right in the environment. When I run my program exe file When using Python you do not have an executable file, just a bunch of .py file scripts.
  • QFileDialog not started in needs dir

    Unsolved
    21
    0 Votes
    21 Posts
    3k Views
    JonBJ
    @cjw25 said in QFileDialog not started in needs dir: But the compilers on the other OSs are complaining that passing in zero is deprecated What dos this mean?
  • How to Disable Hover Effect for Arrows in PYQT6 QTreeView?

    Unsolved
    1
    0 Votes
    1 Posts
    119 Views
    No one has replied
  • Application stops receiving Keypress events during drag operation

    Solved
    2
    1 Votes
    2 Posts
    168 Views
    S
    I've found a solution using QAbstractNativeEventFilter to grab the keyboard events that never make it to the standard Qt event system.
  • QStyleOptionViewItem.rect

    Solved
    9
    0 Votes
    9 Posts
    510 Views
    MasterQM
    @JonB said in QStyleOptionViewItem.rect: @MasterQ said in QStyleOptionViewItem.rect: no, there is really no rect, see the documentation of PySide I provided. The IDE is right! No, there is indeed a rect member! Thank you for that information. My last tests confirm your answer, I was wrong about missing rect. Sry for the confusion.
  • QSystemTrayIcon doesn't show messages

    Solved
    9
    1 Votes
    9 Posts
    735 Views
    superagaS
    @jsulm said in QSystemTrayIcon doesn't show messages: I think it is the title of your application, try to change that Hi @jsulm, many thanks for your reply. I just tried both: QApplication.setApplicationDisplayName and QApplication.setApplicationName, but do not work. Any other idea? Cheers
  • translator files platform dependent?

    Unsolved
    5
    0 Votes
    5 Posts
    256 Views
    MasterQM
    Yes, it is PySide 6.8.0.2 on both OS. But on Linux I use Python 3.12 and on Windows 3.13 --Edit: -- the Python version doesn't matter!, Just tested.
  • 0 Votes
    3 Posts
    204 Views
    K
    @SGaist The problem with doing that is that it will reset the current transform, defeating the purpose of scaling/rotating the item.
  • crop the image

    Unsolved
    2
    0 Votes
    2 Posts
    149 Views
    SGaistS
    Hi, Is that related to this thread ?
  • crop the image

    Unsolved
    5
    0 Votes
    5 Posts
    302 Views
    SGaistS
    Where in that code is the cropping done ?
  • Multi column context menu

    Unsolved
    7
    0 Votes
    7 Posts
    366 Views
    GrecKoG
    A QTableWidget doesn't seem to be most solution thing for this, you are not presenting data. A QHboxLayout of QVBoxLayout would be the solution I'd try.
  • PyCapsule in Shiboken bindings

    Unsolved
    1
    1 Votes
    1 Posts
    118 Views
    No one has replied
  • Logging

    Unsolved
    2
    0 Votes
    2 Posts
    184 Views
    sierdzioS
    @MasterQ said in Logging: What does the qCWarning, qCDebug, ... do? The first parameter is an object. What object? I could not find a suitable documentation. This is for categorized logging, more info here: https://doc.qt.io/qt-6/qloggingcategory.html. I don't know if it works with Python.
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    3 Views
    No one has replied
  • Library conflict when importing PySide6 from C++ embedded Python application

    Unsolved
    2
    0 Votes
    2 Posts
    343 Views
    JonBJ
    @mlperini My 2 cents. Only my assumptions. The pip install of PySide6 is intended for Python use and deliberately standalone/self-contained/isolated from whatever Qt6 you may or may nor have outside on the system. If you have an incompatible version out there it doesn't matter. Conversely the non-Python world just sees what is out there in the system, nothing to do with the Python. So again if they're incompatible it doesn't matter. This works fine for distinct applications. But I can imagine that if you want to mix Python and system/C++ in one process don't you need them to be the exact same version to avoid grief?
  • How to go about creating drag/drop tabs?

    Unsolved
    1
    0 Votes
    1 Posts
    157 Views
    No one has replied
  • modified Qt example editabletreemodel

    Solved
    6
    0 Votes
    6 Posts
    307 Views
    MasterQM
    Oh dear, it's Friday. the isue was that I called i11 = ProjectsTreeItem(["11", "12"]) instead of i11 = ProjectsTreeItem(["11", "12"],i1) I've forgotten to give the parent parameter, which is set to None as default.
  • Is it possible to control where widgets get rendered to?

    Solved
    4
    0 Votes
    4 Posts
    267 Views
    N
    @GrecKo Thanks! That's very helpful~
  • PySide6 in Conda environment: uic automation

    Unsolved
    1
    0 Votes
    1 Posts
    157 Views
    No one has replied
  • 0 Votes
    2 Posts
    185 Views
    jeremy_kJ
    The text description sounds like a QMdiArea