Skip to content

Qt for Python

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

3.3k Topics 14.3k Posts
  • 0 Votes
    1 Posts
    63 Views
    No one has replied
  • Why does PySide6 need glibc 2.39 since 6.8.1 on aarch64?

    Unsolved
    2
    0 Votes
    2 Posts
    108 Views
    SGaistS

    Hi and welcome to devnet,

    If memory serves well, Ubuntu is used to build Qt for ARM. It has that more recent version of glibc.

  • using qt designer to connect a widget to a method

    Unsolved
    4
    0 Votes
    4 Posts
    148 Views
    SGaistS

    You're welcome !

    I'll put it in a different way: it gives you more control and it's also easier to reason about when reading the code.

    In any case, since you have the answer you sought, please mark the thread as solved using the Topic Tools button or the three dotted menu beside the answer your deem correct so other forum users may know a solution has been found :-)

  • readyRead signal not activating while using QSerialProt

    Solved
    5
    0 Votes
    5 Posts
    184 Views
    jsulmJ

    @Adar70 said in readyRead signal not activating while using QSerialProt:

    I don't know how to make it more robust

    Don't rely on the number of times readyRead is emitted. Instead accumulate the received data until you received all you expect to receive.

  • Using Signals in QGraphicsItem

    Solved
    25
    0 Votes
    25 Posts
    891 Views
    SGaistS

    @JonB I misread the code !

    We are in the territory where your solution (using __init__) is the way to go. Multiple inheritance in Python is quite tricky...

    QObject expects an optional parent parameter which is not given here but it's not expecting the parameters for the QGraphicsLineItem constructor hence the failure. You can try to use the kwargs trick however it won't work either as it's not part of any of the method signature and thus can't work either.

  • How to structure this project?

    Solved
    8
    0 Votes
    8 Posts
    309 Views
    D

    That is great. Thank you very much for your time and help.

    Would you have any (open source) pyqt projects you would recommend to look at and learn from?

    I've got a couple of good books but they usually have small examples focused on specific topics, not complete projects. I'm currently mostly looking at how https://github.com/dietervansteenwegen/serial-tool is set up and try to understand and copy (if it makes sense) that.

  • 0 Votes
    6 Posts
    196 Views
    N

    Hmmm... actually, I finally made it : and the solution was... to remove margins from theQHBoxLayout of the QWidget !
    Jesus ! I'll have to carefully remember that one 😅

  • 0 Votes
    3 Posts
    163 Views
    C

    It looks like your signal-slot connection is stacking each time you open the child window. Try disconnecting the signal before reconnecting it in handlePlot() using window.signal.disconnect(self.handleData). This should prevent multiple calls to handleData(). My cousin, who is a professional photographer, was always struggling with sending full-resolution images to clients. After trying various platforms, he finally settled on Filemail, and it has been a game-changer for him. No compression, no sign-ups for recipients, and super-fast uploads—everything he needed for hassle-free file transfers.

  • Connecting C++ Qt widgets and PySide2 ones

    Unsolved
    13
    0 Votes
    13 Posts
    3k Views
    SGaistS

    Sorry, I can't as I don't have access to the archives that might contain this article.

    However, you will likely be interested by the example linked by @tellien .

  • printing issue in a qt app pyqt5

    Unsolved
    6
    0 Votes
    6 Posts
    238 Views
    SGaistS

    AFAIK, both packages can coexist in the same environment as they come each with their own build of Qt.
    However, to get better help, as @jsulm suggested, you should bring that issue to the Salome forum.

  • PyQt5 show hide is not working when shortcut is used

    Unsolved
    1
    0 Votes
    1 Posts
    68 Views
    No one has replied
  • how to include page1.ui file in mainwindow.ui file

    Solved
    6
    0 Votes
    6 Posts
    248 Views
    JonBJ

    @abiabi
    Because Qt Designer/Creator is not particularly Python-oriented.
    The accepted solution from @eyllanesc is the way to go, as with his other Python posts.

  • shiboken6/pyside6 with poetry under msys2

    Unsolved
    3
    0 Votes
    3 Posts
    145 Views
    R

    Hello @Jaime02 ,

    Hum I am using poetry and as it is showed in the project, there is no specified version (so it takes the latest if available). It works perfectly out of the poetry world yes for sure, but not in poetry one...

  • How to develop python qwidget for c++ QMainWindow?

    Unsolved
    4
    0 Votes
    4 Posts
    168 Views
    Pl45m4P

    @MonkeyBusiness said in How to develop python qwidget for c++ QMainWindow?:

    I would like a c++ pointer to the created python QWidget

    But why?
    Either write the rest of the GUI also in Python or rewrite the widget in C++.

  • 0 Votes
    2 Posts
    119 Views
    JonBJ

    @BGrimaud
    If you delete the ui_...py file and resave does that recreate it, and reflect new changes?
    Do you have the option to try a newer version of Creator?

  • trying to create a python binding for a C++ Qwidget

    Unsolved
    7
    0 Votes
    7 Posts
    584 Views
    M

    @friedemannkleint hi fried, I have question, does the example's python qwidget able to dock onto a c++ qmainwindow?

  • 0 Votes
    3 Posts
    151 Views
    K

    Please run your app in debugger to see where that happens

    Dear @jsulm,
    Thank you for your suggestion. I did execute the application using the debugger; however, it encountered an issue at the first line of the init_gl function, displaying a message indicating "disconnected unexpectedly." Unfortunately, no further information was provided.

  • 0 Votes
    2 Posts
    105 Views
    M

    Found solution for this problem!

    By default, QCompleter object is set to CaseInsensitive and that is what was setting it to the previous entry. With an addition of line like this:

    self.combo_box.completer().setCaseSensitivity(Qt.CaseSensitivity.CaseSensitive)

    things are working correctly!

  • 0 Votes
    1 Posts
    91 Views
    No one has replied
  • 0 Votes
    9 Posts
    314 Views
    F

    We actually provide a tool,
    pyside6-project , which defines a simple project file format and can do these steps automatically and can also be opened in Qt Creator.