Skip to content

Qt for Python

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

3.3k Topics 14.5k Posts
  • Pyside6 subclass can't connect to slot of BaseClass ???

    Unsolved
    8
    0 Votes
    8 Posts
    199 Views
    D
    Hi, to everybody reading that. This is a help request after many search, but i'm missing something, somehow. Sorry if my post are a bit messy, my mind is too.. haha In clear i just want to automate some connection that will be present on every object, like logging, or user output. And be able to update GUI from a base object that handle all object (Widget, USB,Serial,TCP,etc...), propagate config, styleSheet and so on to every object registered. Until know i have made a package that regroup all the tools. it's ok, it's clean (Thanks to mkinit script), it work. I can reuse it for any project cool ! But know the interconnection is my problem But i thinking more and more that it's a bad design... can you tell me your opinion ? Thanks !
  • Failed to install QT designer using Python 3.12.3 (URGENT HELP)

    Unsolved
    3
    0 Votes
    3 Posts
    2k Views
    A
    install pyside6 which is supported in python latest versions . Once you installed it search for pyside6-designer.exe in your pc My path is C:\Users\user\AppData\Local\Programs\Python\Python312\Scripts\pyside6-designer.exe
  • How can I display an interactive family tree-style graph in PyQt6?

    Unsolved python qt for python
    2
    0 Votes
    2 Posts
    59 Views
    SGaistS
    Hi and welcome to devnet, One thing you could use is QTransposeProxyModel to turn the model 90 degrees. However it will likely not show things as you want. The second option is for you to implement your own view that draws cells the way you want.
  • Issue with virtualkeyboard and Pyside6

    Solved
    7
    0 Votes
    7 Posts
    277 Views
    F
    https://bugreports.qt.io/browse/QTBUG-137250
  • Pyside6 on embedded linux

    Unsolved
    3
    0 Votes
    3 Posts
    402 Views
    E
    Hi, Any news about that? I’m trying to use a Pyside6 app without desktop with KMS. It works with linuxfb but I need to rotate the screen and it’s not possible on that platform.
  • QMediaPlayer.setLoops(1) finishes current loop and does two more: is it normal?

    Unsolved
    6
    0 Votes
    6 Posts
    749 Views
    T
    Hi, I still have this issue with QMediaPlayer for the same purpose, using @jeertmans great manim-slides library. I would like to create a smooth transition "at the end of the next loop", but again the loop runs 2 more times before stopping. Any idea where this could come from? Thanks in advance
  • Python code for .ui file

    Unsolved
    3
    0 Votes
    3 Posts
    118 Views
    F
    See also https://doc.qt.io/qtforpython-6/tutorials/basictutorial/uifiles.html#tutorial-uifiles . If you create a Python project in Qt Creator, it will do this automatically when running the project.
  • QSqlQueryModel.setQuery() won´t accept strg

    Solved qt for python pyside
    5
    0 Votes
    5 Posts
    160 Views
    S
    Solved: Missing parenthesis in self.mod_Indication = QtSql.QSqlQueryModel correct: self.mod_Indication = QtSql.QSqlQueryModel()
  • Centered text in QGraphicsView

    Unsolved
    3
    0 Votes
    3 Posts
    135 Views
    S
    @SGaist said in Centered text in QGraphicsView: self.setSceneRect(0, 0, self.viewport().width(), self.viewport().height()) Thank you. Yes, that is indeed what was missing. I had this line before, but probably at the wrong place, so I discarded it.
  • Could not load the Qt platform plugin "windows" even though it was found

    Unsolved
    11
    0 Votes
    11 Posts
    428 Views
    jsulmJ
    @memyselfandi Important is to not to mix different Qt versions
  • How to acquire the frame colour?

    Unsolved
    1
    0 Votes
    1 Posts
    92 Views
    No one has replied
  • Pyqt5 : finding the selection in a qTextEdit

    Unsolved
    2
    0 Votes
    2 Posts
    118 Views
    SGaistS
    Hi and welcome to devnet, Which position do you mean ? In widget coordinates ? The number of chars from the start of the text ?
  • QGraphicsLayout not properly resizing to change of content

    Unsolved
    5
    0 Votes
    5 Posts
    874 Views
    1
    14/5000 So in the end, in what way was it solved?
  • Unable to run a Pyside6 application in QtCreator

    Solved
    7
    0 Votes
    7 Posts
    2k Views
    A
    I know this post is old, but in my case when I got this error, I was missing the tomlkit module in my python installation.
  • Why does PySide6 need glibc 2.39 since 6.8.1 on aarch64?

    Solved
    4
    0 Votes
    4 Posts
    316 Views
    A
    After doing some digging I found this thread. My Python project on Raspberry Pi OS requires PySide6==6.8.3 or later which depends on glibc 2.39 but RPiOS only provides 2.36. I tried building from source and containerising it with chroot but neither produced the proper result. I'm going try switching to Ubuntu Server 24.04 for Raspberry Pi and hope for the best seeing as it will have the proper glibc version. If I don't report back within the week assume that it worked.
  • Main window always opens on 'incorrect' monitor

    Solved
    4
    0 Votes
    4 Posts
    196 Views
    C
    Hi All, first things first, I am stuck on python 3.7.3. I tried upgrading to the latest supported version of pyside6 which seems to be 6.5.3. This seems to have fixed my issue. I did make a python version of @CassD script and using pyside 6.2.4, I get the following output manufacturer : model : Screen Name : LF24T450F Screen Size : PySide6.QtCore.QSize(1920, 1080) While using pyside 6.5.3, I get the following manufacturer : Samsung Electric Company model : LF24T450F Screen Name : LF24T450F (1) Screen Size : PySide6.QtCore.QSize(1920, 1080) manufacturer : Samsung Electric Company model : LF24T450F Screen Name : LF24T450F (2) Screen Size : PySide6.QtCore.QSize(1920, 1080) So it seems version 6.2.4 does have some issues detecting screens. In any case, my issue is now resolved, thanks.
  • Get XY Coordinates of QTextCursor

    Solved
    3
    0 Votes
    3 Posts
    176 Views
    D
    @IgKh Thanks so much for your direction. That was exactly what I needed! Here is the code I used: #####determine the cursor position to scroll the scrollArea as needed #get the blockBoundingRect of the block that holds the QTextCursor blockRect = self.doc.documentLayout().blockBoundingRect(self.cur.block()) #get the QTextLine that holds the QTextCursor cursorLine = self.cur.block().layout().lineForTextPosition(self.cur.positionInBlock()) #get the QTextLine's naturalTextRect so we can get the Y center of the QTextCursor self.cursorLineRect = cursorLine.naturalTextRect() #translate the cursorLineRect to the blockRect self.cursorLineRect.translate(blockRect.x(),blockRect.y()) #get the approximate X position of the cursor cursorToX = cursorLine.cursorToX(self.cur.positionInBlock(), QTextLine.Edge.Leading) #create a QPointF from the cursorToX posistion and the center of the CursorLineRect self.cursorPoint=QPointF(float(cursorToX[0])+blockRect.x(),self.cursorLineRect.center().y()) #instruct the QScrollArea to keep the QPointF visible with 100px padding self.main_window.scrollArea.ensureVisible(self.cursorPoint.x(), self.cursorPoint.y(),100,100) Then to confirm my computation was correct I painted self.cursorPoint using painter.drawPoint(self.cursorPoint) . You can see the little red dot following the text cursor in the screenshot below. Your guidance solved my problem 100% [image: 76f8252d-e31d-406b-8d53-f90af5c226ad.JPG]
  • Is building for iOS supported?

    Unsolved
    7
    0 Votes
    7 Posts
    333 Views
    P
    Ah ok, thanks for the ticket. Watched and voted. So it looks like it is a question of priority and bandwidth. I have not played with pyside6-deploy for the other platforms yet. I suppose that would be the place to start before looking for the problems arising from applying the same technique to iOS. Is there a published development plan where this falls for the Qt Company's internal developer resources?
  • Generating PY from QRC Everytime a Resource file changes

    Unsolved
    4
    0 Votes
    4 Posts
    453 Views
    P
    I made a batch script that I run every time I detect that the .qrc (or .ui) files have changed. It's all automated before launching the application.
  • PySide6 QLineSeries doesn't plot correctly

    Unsolved
    3
    0 Votes
    3 Posts
    181 Views
    jronaldJ
    @JonB said in PySide6 QLineSeries doesn't plot correctly: this should not be a PySide6/Python issue Yes, https://bugreports.qt.io/browse/PYSIDE-3083 For it seems not so robust, I tries PythonQwt, but it is not complete, e.g. QwtArraySeriesData is not ported for python. Now I'm using matplotlib with qtagg backend, it works fine. It's said that QtGraphs is going to replace QtCharts, but the API in C++ is not complete so far, I'll follow it. Thanks