Skip to content

Qt for Python

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

3.3k Topics 14.6k Posts
  • Issues with pyside2 setup and Anaconda3

    Unsolved
    2
    2 Votes
    2 Posts
    2k Views
    D
    @markugra your solution for windows 10 worked for me. Thanks!
  • [Solved]QAreaSeries not Showing up. Qt Charts

    Unsolved qt for python python
    2
    0 Votes
    2 Posts
    499 Views
    SGaistS
    Hi, You have here an example of how to build an area series. It's in C++ but easily translated to Python. I think it should provide you with the information you are looking for.
  • PyQtCharts QAreaSeries. Nothing Show's up.

    Unsolved qt for python python
    6
    0 Votes
    6 Posts
    935 Views
    JonBJ
    @Qt-Bot05 Well, it seems to me you're using Y values the wrong way round for upperSeries and lowerSeries! But I think the docs imply that doesn't actually matter, though you might want to verify by swapping. Also, you're testing with just 2 points, it's an area series so why would you test with less than 4? What are you expecting to see? Anyway, your issue is probably something else. Have you checked it works for you for other than QAreaSeries?
  • Creating a column of editable Checkbox in QTableview using QItemDelegate

    Unsolved
    7
    0 Votes
    7 Posts
    6k Views
    JonBJ
    @hachbani Yes, like I wrote at the end, this way you never create any QCheckbox yourself, and you don't go into editable mode with createEditor() etc. The code is only to do with getting the checkbox centered. Just start out with using CheckStateRole to store the state and ItemIsUserCheckable in the flags. This allows the user to check the box without anything further.
  • It looks like showFullscreen() and showNormal() have different effects

    Solved
    3
    0 Votes
    3 Posts
    652 Views
    lionelML
    @jsulm said in It looks like showFullscreen() and showNormal() have different effects: parents layout Thanks, that helped me out. I tried using setParent, but forgot to add it back to the parents layout.
  • Not retrieving data from QDialog when clicking on Cancel button

    Solved
    4
    0 Votes
    4 Posts
    666 Views
    JonBJ
    @hachbani As @SGaist said. Make sure your Add button calls accept(), or done() with a particular value, to exit the dialog. And Cancel button should call reject(). Not just close() as you have now. That is what QDialogs should do. Then the return result of the exec() will give that value to the caller, for you to examine.
  • How to add columns in QTableView?

    Solved
    7
    0 Votes
    7 Posts
    5k Views
    _
    @JonB Is it possible to take the data from the table and store it in some Python structure, for example, a list and then put it in a QTableView?
  • 0 Votes
    4 Posts
    4k Views
    L
    @LaGuiche55 Following your question, I have uninstalled and reinstalled those components and now it works . I have uninstalled Qt with ./MaintenanceTool pip uninstalled PyQt5 pip uninstalled matplotlib sudo apt-get install qt5-default Qt install with online install executable pip install PyQt5 pip install matplotlib Thanks
  • Load image out of the resource files

    Unsolved
    2
    0 Votes
    2 Posts
    413 Views
    JonBJ
    @Black-Cat You can read resources out of a resource file. But you cannot but every time that I need to change this file I need to save the new file in resources and reload the resource file and this is inviable to me. even if it's what you say you have to have! Resource files are read-only, generated at compile time. You can of course change which file you read in that string, if you have a variety of files saved in the resources. But you cannot write back anything to a resource file at runtime. Nor should you need to. Where are these "new file"s, how to you propose to generate them at runtime? If you do have to save to external file, you can save to the actual OS file system and then read that back as a png or whatever, but not as an embedded resource.
  • window too big

    Unsolved
    2
    0 Votes
    2 Posts
    573 Views
    jsulmJ
    @lumpynose said in window too big: Or, how can I make a window that's 800x600 pixels? https://doc.qt.io/qt-5/qwidget.html#resize-1
  • The background image of the frame does not appear.

    Solved
    10
    0 Votes
    10 Posts
    3k Views
    SGaistS
    Great ! Since you have it working now, please mark the thread as solved using the "Topic Tools" button or the three dotted menu beside the answer you deem correct so that other forum users may know a solution has been found :-)
  • Return a function when arrow up key pressed?!

    Solved
    5
    0 Votes
    5 Posts
    2k Views
    eyllanescE
    @Black-Cat With the little code it is impossible to help you so if you want more help then you must provide a minimal and reproducible example
  • Exception occured when close the app

    Unsolved
    2
    0 Votes
    2 Posts
    245 Views
    JonBJ
    @Lucas_1603 As per the code in the RuntimeError you show, it is not the code you in your claimed code. Either you are not showing the code you are executing, or there is more going on elsewhere in your Python app than you show.
  • calling a file from another?

    Moved Unsolved qt for python open qt files import
    2
    0 Votes
    2 Posts
    502 Views
    JonBJ
    @goingwtheflow You have two .py files, each with their own main, hence standalone programs. How do you intend for them to interact? One would be better without the main. When you post code, please use the Code icon on the toolbar to make your code legible.
  • QT Designer is missing help files?

    Unsolved
    2
    0 Votes
    2 Posts
    513 Views
    sierdzioS
    Install and use Qt Creator - it comes with contextual help included.
  • How do u make wizard file in .ui format display when button is triggered

    Unsolved
    2
    0 Votes
    2 Posts
    193 Views
    SGaistS
    Hi and welcome to devnet, It seems you might be mixing two things here. .ui files are generated using the standard Designer. Can you explain exactly what you are currently doing ?
  • QMessageBox clicked standard button with open (not exec_)

    Solved
    7
    0 Votes
    7 Posts
    2k Views
    D
    @JonB Honestly fair enough, thanks a lot.
  • [NEED HELP] ImportError PySide2.QtCore

    Solved
    15
    0 Votes
    15 Posts
    5k Views
    Lucas_1603L
    Hi @SGaist, I've just created a new environment using conda and installed everything from scratch, now it works fine Thank you so much
  • QTableWidget, CellWidget read only.

    Unsolved
    2
    0 Votes
    2 Posts
    470 Views
    SGaistS
    Hi, Call setEnabled(false). Beware of your use of cell widgets. It's not meant as a solution to populate full columns.
  • GridLayout Help

    Unsolved
    2
    0 Votes
    2 Posts
    247 Views
    SGaistS
    Hi, Can you provide a minimal runnable script that shows that behaviour ? Which version of PyQt/PySide are you using ?