Skip to content

Qt for Python

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

3.2k Topics 13.9k Posts
  • 1 Votes
    8 Posts
    204 Views
    F

    As it is an issue of the underlying Qt library unrelated to the Python bindings it would have to reported under QTBUG though ( see https://wiki.qt.io/Reporting_Bugs / https://wiki.qt.io/Qt_for_Python/Reporting_Bugs ).

  • How to set QCamera resolution on Qt 6

    Solved
    4
    0 Votes
    4 Posts
    155 Views
    R

    @friedemannkleint Thx

  • QTableWidgetItem - type

    Solved
    4
    0 Votes
    4 Posts
    473 Views
    MasterQM

    OK, I found my mistake.

    It is not because of locale.string_format. Two of the columns are to separated positive and negative values. One is holding all positives and the other all negativs.

    If a positive value is found I created a QTableWidgetItem for the 'positive' column but forgott the create one for the 'negative' column and vice versa.

    Stupid!

  • LocalStorage in QWebEngineView not saved after running.

    Unsolved
    2
    0 Votes
    2 Posts
    72 Views
    JonBJ

    @Daic
    I don't know, but start by verifying

    Setting attribute QWebEngineSettings::LocalStorageEnabled is true. QWebEngineProfile::persistentStoragePath() is set to where you expect, does it get updated?
  • QTableView - CheckState

    Solved
    5
    0 Votes
    5 Posts
    129 Views
    MasterQM

    Yes, you are right. PartiallyChecked is the right key word here.

    Now I see, what the difference was between my C++ version and the Python version.

    @JonB said in QTableView - CheckState:

    If you are using 1, True or an expression returning true for Qt.CheckState.Checked that is wrong, and would set Qt.CheckState.PartiallyChecked.

    That was the point.

    thnx

  • 0 Votes
    14 Posts
    517 Views
    JoeCFDJ

    @Big_bo libqwebp.so needs libwebp.so.6. Type command:
    locate libwebp.so.6
    to find its path. Then add its path to your env lib path

  • 0 Votes
    4 Posts
    108 Views
    JonBJ

    @dark_matter_io
    So this is presumably a Qt6 issue rather than PyQt/PySide/Python. You can report at https://bugreports.qt.io/secure/Dashboard.jspa

  • 0 Votes
    2 Posts
    61 Views
    JonBJ

    @markleo
    PySide is not a language. It's just a bunch of Python code bindings to Qt functions written in C++. So your question is just about Python. To which you have answered that "Python is a weakly - typed language".

  • QTableView rows disabled?

    Solved
    9
    0 Votes
    9 Posts
    226 Views
    MasterQM

    @JonB said in QTableView rows disabled?:

    Then you will have to break down/build up till you find the difference in your code! Start by removing "front end identity model", just test directly on model (maybe non-SQL one as well as SQL one) and build back up from there.

    If I would like to find a reason for that behavior!

    At the moment I am satisfied to know about. There is an easy workaround as to set all flags by hand independently to what the framework does. That's enough for now. ... at least for me.

    I am sorry, but to dig deeper into the issue is actually out of my scope.

  • Error in exe file

    Unsolved
    3
    0 Votes
    3 Posts
    100 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
    2k 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
    50 Views
    No one has replied
  • 1 Votes
    2 Posts
    103 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
    276 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
    8
    1 Votes
    8 Posts
    518 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
    169 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
    104 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
    81 Views
    SGaistS

    Hi,

    Is that related to this thread ?

  • crop the image

    Unsolved
    5
    0 Votes
    5 Posts
    170 Views
    SGaistS

    Where in that code is the cropping done ?

  • Multi column context menu

    Unsolved
    7
    0 Votes
    7 Posts
    196 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.