Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Convert python to Qt c++
Post: RE: Convert python to Qt c++

This is the code I ended up with (from the QSqlRelationalDelegate 's code), and works! Any comments are welcome. int positionColumn = 2; qDebug()<< "BookDelegate.createEditor index.colum...
panoss GUI 1 1,285 Feb-05-2022, 06:56 PM
    Thread: How to update the list of a combo box in a QTableView
Post: RE: How to update the list of a combo box in a QTa...

It works fine for me, I don't know why is this happening to you.
panoss GUI 10 6,269 Feb-05-2022, 03:24 PM
    Thread: Convert python to Qt c++
Post: Convert python to Qt c++

This is the code I want to convert to Qt c++: def createEditor(self, parent, option, index): # column of combo box 'position' positionColumn = 2 print("myDelegate.createEdi...
panoss GUI 1 1,285 Feb-05-2022, 03:14 PM
    Thread: How to update the list of a combo box in a QTableView
Post: RE: How to update the list of a combo box in a QTa...

I don't understand what you 're saying, it works fine for me.
panoss GUI 10 6,269 Feb-05-2022, 12:45 PM
    Thread: How to update the list of a combo box in a QTableView
Post: RE: How to update the list of a combo box in a QTa...

Ok, I found it! I subclassed the QSqlRelationalDelegate: # Created by: PyQt6 UI code generator 6.2.3 # # WARNING: Any manual changes made to this file will be lost when pyuic6 is # run again. Do no...
panoss GUI 10 6,269 Feb-05-2022, 09:15 AM
    Thread: How to update the list of a combo box in a QTableView
Post: RE: How to update the list of a combo box in a QTa...

I renamed it from 'UpdateArticlesModel' to 'RefreshArticlesModel' and updated the code in the first post.
panoss GUI 10 6,269 Feb-04-2022, 08:16 PM
    Thread: How to update the list of a combo box in a QTableView
Post: RE: How to update the list of a combo box in a QTa...

(Feb-04-2022, 07:48 PM)Axel_Erfurt Wrote: The function UpdateArticlesModel only has print. Where is the database updated? The 'articles' table does not get updated. Only the 'positions' table gets u...
panoss GUI 10 6,269 Feb-04-2022, 08:08 PM
    Thread: How to update the list of a combo box in a QTableView
Post: RE: How to update the list of a combo box in a QTa...

I removed the 'model = QSqlTableModel(self.tableView)'.
panoss GUI 10 6,269 Feb-04-2022, 07:42 PM
    Thread: How to update the list of a combo box in a QTableView
Post: How to update the list of a combo box in a QTableV...

Panoss about 2 hours ago I have a problem refreshing the data in the list of a combo box in a QTableView. When you run the program (I have put all the classes in one file for your convenience) it wil...
panoss GUI 10 6,269 Feb-04-2022, 07:07 PM
    Thread: How a QMainWindow can open a dialog?
Post: RE: How a QMainWindow can open a dialog?

I found it, thanks! from PyQt6 import QtCore, QtGui, QtWidgets from PyQt6.QtWidgets import QMainWindow, QPushButton, QDialog, QApplication, QVBoxLayout from PyQt6.QtWidgets import QMainWindow, QHBoxL...
panoss GUI 4 3,581 Feb-03-2022, 04:33 PM
    Thread: How a QMainWindow can open a dialog?
Post: RE: How a QMainWindow can open a dialog?

It was so simple, this is embarashing **biggrin** . What if I want the second form to derive from 'object'? 'class Ui_dialog_in(object):' (because this is what is produced by pyuic6)
panoss GUI 4 3,581 Feb-02-2022, 09:32 PM
    Thread: How a QMainWindow can open a dialog?
Post: How a QMainWindow can open a dialog?

I have the following code which has two classes: -Ui_dialog_in -myWindow What I 'm trying to achieve is: -when myWindow opens, to open a Ui_dialog_in What must I change - add? from PyQt6 import Q...
panoss GUI 4 3,581 Feb-02-2022, 08:45 PM
    Thread: Modify project (so that it uses db, QSqlRelationalTableModel etc)
Post: Modify project (so that it uses db, QSqlRelational...

I have this program which displays a form with a QTableView which has 2 columns. The second column is a combo box. I want to modify it so that: -the table gets data from an SQLite database -the combo ...
panoss GUI 0 1,278 Jan-31-2022, 10:14 PM
    Thread: Call a function in FormA from FormB
Post: RE: Call a function in FormA from FormB

Guys thank you and forgive me for the lack of information. deanhystad this is EXACTLY what I wanted!
panoss GUI 3 1,910 Jan-30-2022, 07:45 PM
    Thread: Call a function in FormA from FormB
Post: Call a function in FormA from FormB

Hi everybody. I 'm looking for a simple example (with SIGNAL, SLOt and Emit()) where we have: -a main form, say 'FormA' which opens another form, let's say 'FormB' -FormB has a button which when click...
panoss GUI 3 1,910 Jan-30-2022, 06:56 PM
    Thread: Converting c++ class to python class
Post: RE: Converting c++ class to python class

I found the solution! Changed: currentSelection = pyqtProperty(int, currentSelection, setCurrentSelection)...to: currentSelection = pyqtProperty(int, currentSelection, setCurrentSelection, user = Tru...
panoss General Coding Help 12 11,870 Jul-23-2017, 08:33 AM
    Thread: Converting c++ class to python class
Post: RE: Converting c++ class to python class

Ok, another c++ clas that I 'm tryin to convert to python: HEADER file: class OptionGroup : public QWidget { Q_OBJECT Q_PROPERTY(int currentSelection READ currentSelection WRITE setCurrentSelection U...
panoss General Coding Help 12 11,870 Jul-21-2017, 12:12 PM
    Thread: Converting c++ class to python class
Post: RE: Converting c++ class to python class

Finally I just made the class inherit QAbstractProxyModel, so an excact 'translation' of C++ class to python class was not achieved, but it 's functioning correctly. So I ended up to: class EPNCComboM...
panoss General Coding Help 12 11,870 Jul-18-2017, 02:22 PM
    Thread: Converting c++ class to python class
Post: RE: Converting c++ class to python class

Larz60, sorry but I don't understand what you 're saying. Which functionality and which PyQt5? I 'm using only PyQt4. QAbstractProxyModel is a class (a Qt model class).
panoss General Coding Help 12 11,870 Jul-17-2017, 01:47 PM
    Thread: Converting c++ class to python class
Post: RE: Converting c++ class to python class

This is it (at line 11 is the error): C:\Python34\python.exe C:/Users/Pangs/PycharmProjects/repairdevicesv7_qt/main.py Database: connection ok 0.RepairDevices c= 0 Traceback (most recent call last):  ...
panoss General Coding Help 12 11,870 Jul-17-2017, 11:48 AM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020