Skip to content
QtWS25 Last Chance
  • QThread Freezes GUI

    Unsolved Language Bindings pyside2 qthread pyqt5
    2
    0 Votes
    2 Posts
    2k Views
    SGaistS
    Hi, Looks like there's some problem with the PySide 2 implementation. You should check the bug report system to see if it's something known. If not, please consider opening a new report providing your example and as much details as possible about your current setup.
  • 0 Votes
    4 Posts
    11k Views
    VRoninV
    @MATTK said in Configuring checkbox when using QTreeWidget: is this a bug or a known issue from Qt Designer? No, it's 100% intended behaviour. the condition is checked here You have 2 options: set the Qt::CheckStateRole for the indexes you want to have a checkbox. In your widget constructor you'd call something like setUnchecked(ui->treeWidget->model()); void setUnchecked(QAbstractItemModel* model, const QModelIndex& parent = QModelIndex()){ if(!model) return; for(int i=0, maxRow=model->rowCount(parent);i<maxRow;++i){ for(int j=0, maxCol=model->columnCount(parent);j<maxCol;++j){ const QModelIndex currIdx = model->index(i,j,parent); model->setData(currIdx,Qt::Unchecked,Qt::CheckStateRole); if(model->hasChildren(currIdx)) setUnchecked(model,currIdx); } } } subclass the delegate to check the flag instead of Qt::CheckStateRole and call something like ui->treeWidget->setItemDelegate(new CheckFlagDelegate(this)); in your widget constructor class CheckFlagDelegate : public QStyledItemDelegate{ Q_OBJECT Q_DISABLE_COPY(CheckFlagDelegate) public: explicit CheckFlagDelegate(QObject* parent = Q_NULLPTR) : QStyledItemDelegate(parent){} protected: void initStyleOption(QStyleOptionViewItem *option, const QModelIndex &index) const Q_DECL_OVERRIDE{ QStyledItemDelegate::initStyleOption(option,index); if(index.model()->flags(index) & Qt::ItemIsUserCheckable) option->features |= QStyleOptionViewItem::HasCheckIndicator; } }; Since the functionality is defined in a QObject (the delegate) and not in a QWidget this is not something designer can and probably ever will manage
  • Custom Widgets on qt designer

    Solved General and Desktop pyqt5 custom button
    5
    0 Votes
    5 Posts
    2k Views
    M
    @mrjj okay thank you very much! And yes, my Designer also have a StyleSheet editor like this: [image: b0514126-6482-4684-b443-b4cfedaa23cb.PNG] Cheers
  • 0 Votes
    2 Posts
    1k Views
    KillerSmathK
    Hi there. I think you can use TableViewColumn element to create a new column inside a TableView component. If necessary, you can define your own delegate to set how the data is showed to user. Read more: http://doc.qt.io/qt-5/qml-qtquick-controls-tableview.html#details <- TableView Documentation http://doc.qt.io/qt-5/qtquickcontrols-tableview-main-qml.html <- TableView Example
  • 0 Votes
    1 Posts
    587 Views
    No one has replied
  • VTK integration in PyQt (wrong layout)

    Unsolved General and Desktop python vtk pyqt pyqt5
    2
    0 Votes
    2 Posts
    2k Views
    SGaistS
    Hi, You are replacing the central widget in OpenVTK. You should rather add your widget to the current central widget's layout.
  • How to clear QVBoxLayout by a Signal?

    Solved General and Desktop pyqt5
    6
    0 Votes
    6 Posts
    4k Views
    P
    def clearvbox(self, L = False): if not L: L = self.vbox if L is not None: while L.count(): item = L.takeAt(0) widget = item.widget() if widget is not None: widget.deleteLater() else: self.clearvbox(item.layout())
  • How to jump millisecond in video?

    Moved Unsolved Language Bindings pyqt5
    2
    0 Votes
    2 Posts
    797 Views
    SGaistS
    Hi, What résolution are you expecting ?
  • Adding video window

    Moved Unsolved Language Bindings pyqt5
    4
    0 Votes
    4 Posts
    1k Views
    SGaistS
    Well... Then you can translate the example from the class detailed documentation in Python and you have a minimal video player.
  • 0 Votes
    1 Posts
    1k Views
    No one has replied
  • How I can to part?

    Moved Unsolved Language Bindings pyqt5
    6
    0 Votes
    6 Posts
    2k Views
    mrjjM
    @Dl10 Hi I think it exists https://www.youtube.com/watch?v=Dmo8eZG5I2w There you just place 4 qframes on center mainwindow Then right click (not on frames) and from layout menu select Grid layout
  • How can I delay but not time.sleep?

    Moved Unsolved Language Bindings pyqt5
    3
    0 Votes
    3 Posts
    3k Views
    T
    @Dl10 You may split the function and start a timer.. something like.. from : testFunction(){ step1.. step2.. time.sleep().. step3.. } to testFunction(){ step1.. step2.. qtimer t; connect(&t,SIGNAL(timeOut()),this,SLOT(testFunction2())); t.start(2000); } testFunction2(){ step3... } PS: Syntax may vary.. this is a c++ code.. please convert it to pyqt5.. Hope this is what you are expecting... and thats what i understood from your post...
  • QByteArray to string?

    Solved Language Bindings python3 pyqt5
    29
    -1 Votes
    29 Posts
    32k Views
    JonBJ
    @germyrinn Hi, this was an old post of mine. As I wrote, the problem is that for the £ sign e.g. read from a file created in the way I describe, decode("utf-8") gives me a UnicodeDecodeError. I found the only conversion which works is decode("cp850").
  • 0 Votes
    23 Posts
    13k Views
    daegontavenD
    @SGaist I need the slot send_console_log to be called when the signal written in ConsoleStream is emitted. When running the program with a normal while/for loop in the interpreter, the slot will be called becuase at that moment its non blocking. But the moment I add time.sleep into a loop, slots will only be called at the end when all the blocking is over. Thank you for looking into this.
  • QPainter not active

    Moved Unsolved Language Bindings pyqt5 python
    4
    0 Votes
    4 Posts
    13k Views
    SGaistS
    A quick google search returns this article which covers most aspects of this subject.
  • Python custom widget for Qt Designer

    Unsolved 3rd Party Software python3 pyqt5 designer widget
    2
    0 Votes
    2 Posts
    2k Views
    P
    @Pierone Can you put you code in GitHub instead of a rar file? Its pretty awkward to unpack your code.
  • Python custom widget per Qt Designer

    Unsolved Italian python3 pyqt5 designer
    1
    0 Votes
    1 Posts
    956 Views
    No one has replied
  • Passing list to class init, pyQt

    Solved General and Desktop python3 pyqt5
    4
    0 Votes
    4 Posts
    2k Views
    robbiecooperR
    Thanks @jsulm!! That sorted it!
  • 0 Votes
    5 Posts
    5k Views
    C
    Hay i saw your keyboard its really good, i also want to design this kind of keyboard, can you please tell me when i move the cursor on the keys it automatically enlarge. how is it possible ? and another one is, when i am typing it does not show anything but my only cursor move forward.
  • PyQt5 blurpicker example

    Unsolved Language Bindings pyqt pyqt5 python3 python qtcreator
    5
    0 Votes
    5 Posts
    2k Views
    A
    Thank you! I didnt noticed that. I did correct this mistakes, but still getting the same error:( and empty window :/