Privacy policyContactsAbout siteOpinionsGitHubDonate
© EVILEG 2015-2018
Recommend hosting
TIMEWEB
ИМ
Dec. 9, 2018, 6:55 p.m.
Игорь Максимов

Доброго времени суток. Нашел приложение для конвертации видео + celery что очень радует. Не радует только то что оно отказывается работать под python3

Трейсбек прикладываю:

 File "/home/django/venv/example/lib/python3.5/site-packages/django/core/handlers/exception.py", line 39, in inner
    response = get_response(request)
  File "/home/django/venv/example/lib/python3.5/site-packages/django/core/handlers/base.py", line 187, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "/home/django/venv/example/lib/python3.5/site-packages/django/core/handlers/base.py", line 185, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/home/django/example/media/views.py", line 32, in item_create
    media_item.save()
  File "/home/django/venv/example/lib/python3.5/site-packages/django/db/models/base.py", line 796, in save
    force_update=force_update, update_fields=update_fields)
  File "/home/django/venv/example/lib/python3.5/site-packages/django/db/models/base.py", line 824, in save_base
    updated = self._save_table(raw, cls, force_insert, force_update, using, update_fields)
  File "/home/django/venv/example/lib/python3.5/site-packages/django/db/models/base.py", line 908, in _save_table
    result = self._do_insert(cls._base_manager, using, fields, update_pk, raw)
  File "/home/django/venv/example/lib/python3.5/site-packages/django/db/models/base.py", line 947, in _do_insert
    using=using, raw=raw)
  File "/home/django/venv/example/lib/python3.5/site-packages/django/db/models/manager.py", line 85, in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
  File "/home/django/venv/example/lib/python3.5/site-packages/django/db/models/query.py", line 1045, in _insert
    return query.get_compiler(using=using).execute_sql(return_id)
  File "/home/django/venv/example/lib/python3.5/site-packages/django/db/models/sql/compiler.py", line 1053, in execute_sql
    for sql, params in self.as_sql():
  File "/home/django/venv/example/lib/python3.5/site-packages/django/db/models/sql/compiler.py", line 1006, in as_sql
    for obj in self.query.objs
  File "/home/django/venv/example/lib/python3.5/site-packages/django/db/models/sql/compiler.py", line 1006, in <listcomp>
    for obj in self.query.objs
  File "/home/django/venv/example/lib/python3.5/site-packages/django/db/models/sql/compiler.py", line 1005, in <listcomp>
    [self.prepare_value(field, self.pre_save_val(field, obj)) for field in fields]
  File "/home/django/venv/example/lib/python3.5/site-packages/django/db/models/sql/compiler.py", line 955, in pre_save_val
    return field.pre_save(obj, add=True)
  File "/home/django/venv/example/lib/python3.5/site-packages/django/db/models/fields/files.py", line 292, in pre_save
    file.save(file.name, file, save=False)
  File "/home/django/venv/example/lib/python3.5/site-packages/django/db/models/fields/files.py", line 92, in save
    setattr(self.instance, self.field.name, self.name)
  File "/home/django/example/videokit/fields.py", line 198, in __set__
    self.field.update_dimension_fields(instance, force = True)
  File "/home/django/example/videokit/models.py", line 119, in update_dimension_fields
    width = file.width
  File "/home/django/example/videokit/fields.py", line 133, in _get_width
    return self._get_video_dimensions()[0]
  File "/home/django/example/videokit/fields.py", line 164, in _get_video_dimensions
    self._dimensions_cache = get_video_dimensions(self)
  File "/home/django/example/videokit/fields.py", line 25, in get_video_dimensions
    width = stdout.strip(' \t\n\r')
TypeError: a bytes-like object is required, not 'str'
[09/Dec/2018 18:34:05] "POST /item_create/ HTTP/1.1" 500 151897

И функцию в которой ошибка:

from django.conf import settings
from django.core.files import File
from django.db.models.fields.files import FieldFile
from django.db.models.fields.files import FileDescriptor

from datetime import datetime
import hashlib
import os.path
import subprocess

from videokit.apps import VideokitConfig
from videokit.tasks import generate_video

def get_video_dimensions(file):
    path = os.path.join(settings.MEDIA_ROOT, file.name)

    if os.path.isfile(path):
        try:
            process = subprocess.Popen(
                ['mediainfo', '--Inform=Video;%Width%', path],
                stdout = subprocess.PIPE, stderr = subprocess.PIPE)

            stdout, stderr = process.communicate()
            if process.wait() == 0:
                width = int(stdout.strip(' \t\n\r'))
            else:
                return (0,0)

            process = subprocess.Popen(
                ['mediainfo', '--Inform=Video;%Height%', path],
                stdout = subprocess.PIPE, stderr = subprocess.PIPE)

            stdout, stderr = process.communicate()
            if process.wait() == 0:
                height = int(stdout.strip(' \t\n\r'))
            else:
                return (None, None)

            return (width, height)
        except OSError:
            pass

    return (None, None)

Очень надеюсь на вашу помощь. Заранее благодарен.

ЖН
Dec. 8, 2018, 12:54 p.m.
Жасулан Нургожинов

как сохранить данные приложения после закрытие и как сортировать лист по имени если имена одинаковые то по дате рождения,заранее спасибо

задача примерно таккая:

Write a program with a well designed, developed and tested GUI, which can handle and show information about bank accounts and clients. The GUI provide facilities to add new clients with their data, like name, date of birth, unique client identifier (program generates and fills up automatically), account number (2x8 digits) and balance. So the user can add new client, modify and delete the existent items via GUI if he/she wants it. The software can handle the all possible exception and gives any information about them for the users. The GUI is contained a list view in where the clients are sorted according to their names and date of birth (if the names are equals). The user can filter the clients based on the amount of their money. The software save the collected data into file before closing and load back when it starts.

# -*- coding: utf-8 -*-



# Form implementation generated from reading ui file 'G:\Oktatás\Programozás 2\lab08\worker.ui'

#

# Created by: PyQt5 UI code generator 5.11.3

#

# WARNING! All changes made in this file will be lost!



import re

from PyQt5 import QtCore, QtGui, QtWidgets

import myClasses as mc



class Ui_MainWindow(object):



lsWorkers = []



def setupUi(self, MainWindow):

MainWindow.setObjectName("MainWindow")

MainWindow.resize(541, 600)

palette = QtGui.QPalette()

brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))

brush.setStyle(QtCore.Qt.SolidPattern)

palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.WindowText, brush)

brush = QtGui.QBrush(QtGui.QColor(157, 155, 159))

brush.setStyle(QtCore.Qt.SolidPattern)

palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Text, brush)

brush = QtGui.QBrush(QtGui.QColor(147, 147, 147))

brush.setStyle(QtCore.Qt.SolidPattern)

palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.WindowText, brush)

brush = QtGui.QBrush(QtGui.QColor(157, 155, 159))

brush.setStyle(QtCore.Qt.SolidPattern)

palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Text, brush)

brush = QtGui.QBrush(QtGui.QColor(120, 120, 120))

brush.setStyle(QtCore.Qt.SolidPattern)

palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.WindowText, brush)

brush = QtGui.QBrush(QtGui.QColor(120, 120, 120))

brush.setStyle(QtCore.Qt.SolidPattern)

palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Text, brush)

MainWindow.setPalette(palette)

self.centralwidget = QtWidgets.QWidget(MainWindow)

self.centralwidget.setObjectName("centralwidget")

self.label = QtWidgets.QLabel(self.centralwidget)

self.label.setGeometry(QtCore.QRect(10, 10, 61, 16))

font = QtGui.QFont()

font.setFamily("Arial")

font.setPointSize(14)

self.label.setFont(font)

self.label.setObjectName("label")

self.label_2 = QtWidgets.QLabel(self.centralwidget)

self.label_2.setGeometry(QtCore.QRect(10, 40, 131, 31))

font = QtGui.QFont()

font.setFamily("Arial")

font.setPointSize(14)

self.label_2.setFont(font)

self.label_2.setObjectName("label_2")

self.label_3 = QtWidgets.QLabel(self.centralwidget)

self.label_3.setGeometry(QtCore.QRect(10, 80, 131, 31))

font = QtGui.QFont()

font.setFamily("Arial")

font.setPointSize(14)

self.label_3.setFont(font)

self.label_3.setObjectName("label_3")

self.label_4 = QtWidgets.QLabel(self.centralwidget)

self.label_4.setGeometry(QtCore.QRect(10, 120, 131, 31))

font = QtGui.QFont()

font.setFamily("Arial")

font.setPointSize(14)

self.label_4.setFont(font)

self.label_4.setObjectName("label_4")

self.label_5 = QtWidgets.QLabel(self.centralwidget)

self.label_5.setGeometry(QtCore.QRect(10, 160, 131, 31))

font = QtGui.QFont()

font.setFamily("Arial")

font.setPointSize(14)

self.label_5.setFont(font)

self.label_5.setObjectName("label_5")

self.inName = QtWidgets.QLineEdit(self.centralwidget)

self.inName.setGeometry(QtCore.QRect(70, 0, 461, 31))

font = QtGui.QFont()

font.setPointSize(12)

self.inName.setFont(font)

self.inName.setObjectName("inName")

self.inID = QtWidgets.QLineEdit(self.centralwidget)

self.inID.setGeometry(QtCore.QRect(90, 40, 441, 31))

font = QtGui.QFont()

font.setPointSize(12)

self.inID.setFont(font)

self.inID.setObjectName("inID")

self.inAdd = QtWidgets.QLineEdit(self.centralwidget)

self.inAdd.setGeometry(QtCore.QRect(90, 80, 441, 31))

font = QtGui.QFont()

font.setPointSize(12)

self.inAdd.setFont(font)

self.inAdd.setObjectName("inAdd")

self.inPhone = QtWidgets.QLineEdit(self.centralwidget)

self.inPhone.setGeometry(QtCore.QRect(140, 120, 391, 31))

palette = QtGui.QPalette()

# brush = QtGui.QBrush(QtGui.QColor(141, 141, 141))

# brush.setStyle(QtCore.Qt.SolidPattern)

# palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.WindowText, brush)

# brush = QtGui.QBrush(QtGui.QColor(141, 141, 141))

# brush.setStyle(QtCore.Qt.SolidPattern)

# palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.WindowText, brush)

# brush = QtGui.QBrush(QtGui.QColor(120, 120, 120))

# brush.setStyle(QtCore.Qt.SolidPattern)

# palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.WindowText, brush)

# self.inPhone.setPalette(palette)

font = QtGui.QFont()

font.setPointSize(12)

self.inPhone.setFont(font)

self.inPhone.setObjectName("inPhone")

self.inMail = QtWidgets.QLineEdit(self.centralwidget)

self.inMail.setGeometry(QtCore.QRect(70, 160, 461, 31))

font = QtGui.QFont()

font.setPointSize(12)

self.inMail.setFont(font)

self.inMail.setObjectName("inMail")

self.btnAdd = QtWidgets.QPushButton(self.centralwidget)

self.btnAdd.setGeometry(QtCore.QRect(10, 210, 81, 31))

font = QtGui.QFont()

font.setPointSize(12)

self.btnAdd.setFont(font)

self.btnAdd.setObjectName("btnAdd")

self.btnAdd_2 = QtWidgets.QPushButton(self.centralwidget)

self.btnAdd_2.setGeometry(QtCore.QRect(100, 210, 81, 31))

font = QtGui.QFont()

font.setPointSize(12)

self.btnAdd_2.setFont(font)

self.btnAdd_2.setObjectName("btnAdd_2")

self.btnAdd_3 = QtWidgets.QPushButton(self.centralwidget)

self.btnAdd_3.setGeometry(QtCore.QRect(190, 210, 81, 31))

font = QtGui.QFont()

font.setPointSize(12)

self.btnAdd_3.setFont(font)

self.btnAdd_3.setObjectName("btnAdd_3")

self.btnAdd_4 = QtWidgets.QPushButton(self.centralwidget)

self.btnAdd_4.setGeometry(QtCore.QRect(280, 210, 81, 31))

font = QtGui.QFont()

font.setPointSize(12)

self.btnAdd_4.setFont(font)

self.btnAdd_4.setObjectName("btnAdd_4")

self.label_6 = QtWidgets.QLabel(self.centralwidget)

self.label_6.setGeometry(QtCore.QRect(10, 250, 141, 21))

font = QtGui.QFont()

font.setFamily("Arial")

font.setPointSize(14)

self.label_6.setFont(font)

self.label_6.setObjectName("label_6")

self.list = QtWidgets.QListWidget(self.centralwidget)

self.list.setGeometry(QtCore.QRect(10, 280, 521, 291))

self.list.setFrameShape(QtWidgets.QFrame.Box)

self.list.setObjectName("list")

MainWindow.setCentralWidget(self.centralwidget)

self.menubar = QtWidgets.QMenuBar(MainWindow)

self.menubar.setGeometry(QtCore.QRect(0, 0, 541, 21))

self.menubar.setObjectName("menubar")

MainWindow.setMenuBar(self.menubar)

self.statusbar = QtWidgets.QStatusBar(MainWindow)

self.statusbar.setObjectName("statusbar")

MainWindow.setStatusBar(self.statusbar)



self.retranslateUi(MainWindow)

QtCore.QMetaObject.connectSlotsByName(MainWindow)



self.btnAdd.clicked.connect(self.btnAddClicked)

self.btnAdd_2.clicked.connect(self.editClicked)

self.btnAdd_3.clicked.connect(self.btnAddClicked)

self.btnAdd_4.clicked.connect(self.deleteItem)

# self.list.itemClicked.connect(self.itemClicked)



def retranslateUi(self, MainWindow):

_translate = QtCore.QCoreApplication.translate

MainWindow.setWindowTitle(_translate("MainWindow", "Workers"))

self.label.setText(_translate("MainWindow", "Name:"))

self.label_2.setText(_translate("MainWindow", "ID code:"))

self.label_3.setText(_translate("MainWindow", "Address:"))

self.label_4.setText(_translate("MainWindow", "Phone number:"))

self.label_5.setText(_translate("MainWindow", "Email:"))

self.inPhone.setText(_translate("MainWindow", "+36301234567"))

self.btnAdd.setText(_translate("MainWindow", "Add"))

self.btnAdd_2.setText(_translate("MainWindow", "Edit"))

self.btnAdd_3.setText(_translate("MainWindow", "Modify"))

self.btnAdd_4.setText(_translate("MainWindow", "Delete"))

self.label_6.setText(_translate("MainWindow", "List of persons:"))

self.reloadDatas()



def btnAddClicked(self):

try:

name = self.inName.text()

id = self.inID.text()

address = self.inAdd.text()

phone = self.inPhone.text()

email = self.inMail.text()



if len(name) == 0:

raise mc.MissingDataException('name')

if len(id) == 0:

raise mc.MissingDataException('ID number')

if len(address)==0:

raise mc.MissingDataException('address')

if len(phone)==0:

raise mc.MissingDataException('phone number')

if len(email)==0:

raise mc.MissingDataException('email address')



if len(phone) < 11 or len(phone) > 12 or not re.match('[+]36([0-9])',phone):

raise mc.PhoneNumberFormatException



if not re.match('([0-9a-zA-Z_.-]+@\w+(?:\.\w+))',email):

raise mc.EmailFormatException





except mc.MissingDataException as mse:

msg = QtWidgets.QMessageBox()

msg.setWindowTitle('Warning!')

msg.setIcon(QtWidgets.QMessageBox.Warning)

msg.setText(mse.__str__())

msg.exec()



except mc.PhoneNumberFormatException:

msg = QtWidgets.QMessageBox()

msg.setWindowTitle('Warning!')

msg.setIcon(QtWidgets.QMessageBox.Warning)

msg.setText("The phone number is not in right format!")

msg.exec()



except mc.EmailFormatException:

msg = QtWidgets.QMessageBox()

msg.setWindowTitle('Warning!')

msg.setIcon(QtWidgets.QMessageBox.Warning)

msg.setText("The email address is not in right format!")

msg.exec()



else:

if not self.inID.isReadOnly():

w = mc.Worker(name,id,address,phone,email)

if w not in self.lsWorkers:

self.lsWorkers.append(w)

self.lsWorkers.sort()

self.list.clear()

self.saveToFile()

for i in self.lsWorkers:

self.list.addItem(i.__str__())

else:

msg = QtWidgets.QMessageBox()

msg.setWindowTitle('Warning!')

msg.setIcon(QtWidgets.QMessageBox.Warning)

msg.setText("This person has already applied at your company!")

msg.exec()

else:

for i in self.lsWorkers:

if i.getID() == self.inID.text():

self.lsWorkers.remove(i)

i.setName(name)

i.setAddress(address)

i.setPhone(phone)

i.setEmail(email)

self.lsWorkers.append(i)

self.lsWorkers.sort()

self.list.clear()

self.saveToFile()

self.inID.setReadOnly(False)

for j in self.lsWorkers:

self.list.addItem(j.__str__())





def editClicked(self,item):

if not self.list.currentItem():

msg = QtWidgets.QMessageBox()

msg.setWindowTitle("Warning!")

msg.setIcon(QtWidgets.QMessageBox.Warning)

msg.setText("You should select any person from the list!")

msg.exec()

else:

item = self.list.currentItem()

tmp = item.text()

tmp = tmp.split('(')

id = tmp[1][:-1].split(" ")

id = id[1]

for i in self.lsWorkers:

if id == i.getID():

self.inName.setText(i.getName())

self.inID.setText(i.getID())

self.inAdd.setText(i.getAddress())

self.inPhone.setText(i.getPhone())

self.inMail.setText(i.getEmail())

self.inID.setReadOnly(True)



def deleteItem(self):

if not self.list.currentItem():

msg = QtWidgets.QMessageBox()

msg.setWindowTitle("Warning!")

msg.setIcon(QtWidgets.QMessageBox.Warning)

msg.setText("You should select any person from the list!")

msg.exec()

else:

item = self.list.currentItem()

tmp = item.text()

tmp = tmp.split('(')

id = tmp[1][:-1].split(" ")

id = id[1]

for i in self.lsWorkers:

if id == i.getID():

self.lsWorkers.remove(i)

self.saveToFile()

self.list.clear()

for j in self.lsWorkers:

self.list.addItem(j.__str__())



def saveToFile(self):

outFile = open("database.txt","w")

for i in self.lsWorkers:

print('{};{};{};{};{}\n'.format(i.getName(),i.getID(),i.getAddress(),i.getPhone(),i.getEmail()),file=outFile)

outFile.close()



def reloadDatas(self):

inFile = open("database.txt","r")

for i in inFile:

if i.count(";") == 4:

tmp = i.split(';')

self.lsWorkers.append(mc.Worker(tmp[0],tmp[1],tmp[2],tmp[3],tmp[4][:-1]))

inFile.close()

self.lsWorkers.sort()

for i in self.lsWorkers:

self.list.addItem(i.__str__())







if __name__ == "__main__":

import sys

app = QtWidgets.QApplication(sys.argv)

MainWindow = QtWidgets.QMainWindow()

ui = Ui_MainWindow()

ui.setupUi(MainWindow)

MainWindow.show()

sys.exit(app.exec_())

Oct. 24, 2018, 6:38 a.m.

Django

BeaftifulSoup4, Django, Python, HTML, Python 3

When developing a web site that adds the ability to write comments or publish articles that allow html layout, the mechanism for clearing unwanted html tags, in particular script and style tags, is important, since malicious scripts on a quality resource definitely should not be present. It will also be good to be able to clean up the style of the text, especially if the resource implies a uniform style. The discordance of screaming fonts is not needed by anyone, and adds problems with the layout.

To implement this mechanism, I use the Python package Beautiful Soup 4 and finally wrote one class, which essentially does everything I need. Removes unnecessary tags, adds necessary classes to tags, saves classes in tags, if you need to leave them during stripping, this is important for classes that are added at the stage of writing a comment, for example, when inserting a YouTube video or adding program code when the user selects which programming language should be represented in the program code block.

April 27, 2018, 1:23 p.m.

Python 3

Python 3, variables, var

Variables are nothing but reserved memory locations to store values. It means that when you create a variable, you reserve some space in the memory.

Based on the data type of a variable, the interpreter allocates memory and decides what can be stored in the reserved memory. Therefore, by assigning different data types to the variables, you can store integers, decimals or characters in these variables.

P
March 5, 2018, 12:26 p.m.
PROkaZZZniK

Хочу к стандартному Qt Quick - Stack приложению на Page прикрепить matplotlib график.
Спасибо.

Feb. 24, 2018, 4:51 p.m.

Python 3

Синтаксис, Python 3, Syntax

The Python language has many similarities to Perl, C, and Java. However, there are some definite differences between the languages.

First Python Program

Let us execute the programs in different modes of programming.

Interactive Mode Programming

Invoking the interpreter without passing a script file as a parameter brings up the following prompt −

$ python

Python 3.5.2 (default, Dec 10 2013, 11:35:01)
[GCC 5.4.0] on Linux
Type "help", "copyright", "credits", or "license" for more information.
>>>

On Windows:

Python 3.4.3 (v3.4.3:9b73f1c3e601, Feb 24 2015, 22:43:06) [MSC v.1600 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
>>>

Type the following text at the Python prompt and press Enter −

>>> print ("Hello, Python!")

If you are running the older version of Python (Python 2.x), use of parenthesis as inprint function is optional. This produces the following result −

Hello, Python!
Feb. 18, 2018, 1:34 p.m.

Python 3

Python 3, Python

Python 3 is available for Windows, Mac OS and most versions of the Linux operating system.

Local Environment Setup

Open a terminal window and type "python" to find out if it is already installed and which version is installed.

Getting Python

Windows platform

Binaries of latest version of Python 3 (Python 3.6.4) are available on this download page

The following different installation options are available.

  • Windows x86-64 embeddable zip file
  • Windows x86-64 executable installer
  • Windows x86-64 web-based installer
  • Windows x86 embeddable zip file
  • Windows x86 executable installer
  • Windows x86 web-based installer

Note − In order to install Python 3.6.4, minimum OS requirements are Windows 7 with SP1. For versions 3.0 to 3.4.x Windows XP is acceptable.

Feb. 13, 2018, 10:02 p.m.

Python 3

Python, Python 3

Python is a general-purpose interpreted, interactive, object-oriented, and high-level programming language. It was created by Guido van Rossum during 1985- 1990. Like Perl, Python source code is also available under the GNU General Public License (GPL). Python is named after a TV Show called ‘Monty Python’s Flying Circus’ and not after Python-the snake.

Python 3.0 was released in 2008. Although this version is supposed to be backward incompatibles, later on many of its important features have been backported to be compatible with version 2.7.

D
March 19, 2019, 9:57 a.m.
Damir

C++ - Test 001. The first program and data types

  • Result:73points,
  • Rating points1
ПМ
March 18, 2019, 3:12 p.m.
Пётр Махнёв

C ++ - Test 004. Pointers, Arrays and Loops

  • Result:50points,
  • Rating points-4
ЯГ
March 18, 2019, 7:59 a.m.
Ян Греку

C++ - Тест 003. Условия и циклы

  • Result:21points,
  • Rating points-10
Last comments
March 16, 2019, 1:55 p.m.
Дмитрий

Спасибо за статью. Давно итересует следующий вопрос: с помощью переменных QMAKE_TARGET_COMPANYQMAKE_TARGET_PRODUCTQMAKE_TARGET_DESCRIPTIONможно задать свойства компилируемой программы, о...
JS
March 12, 2019, 10:19 a.m.
Jean Stefanovich

Большое спасибо за разъяснения!
March 12, 2019, 10:04 a.m.
Евгений Легоцкой

Hello, In fact, this functionality or is not implemented, or is not documented. I'm not sure. But I think, that it should be implemented in Text QML Type. Because of we can write text in...
March 12, 2019, 9:51 a.m.
Евгений Легоцкой

Да вы правы. На самом деле проще через QSqlQueryModel, сколько не пытался использовать эти дженерики типо QSqlTableModel и QSqlRelationalTableModel, то всегда упирался в какие-то их ограничени...
JS
March 12, 2019, 9:47 a.m.
Jean Stefanovich

Единицы измерения лежат там же где и названия продуктов. Просто в таблице ингредиенты нет ещё одного столбца, на который можно было бы установить setRelation. Я в итоге в базе создал ещё один ...
Now discuss on the forum
March 17, 2019, 10:47 p.m.
Евгений Легоцкой

Добрый день. Вот, нашлось у меня немного времени. Делается это через шаблон проектирования наблюдатель. GraphKS_mfvSlup.zip
ЧГ
March 15, 2019, 9:52 p.m.
Чарльз Грин

спасибо, попробую, отпишусь
m
March 15, 2019, 7:41 p.m.
mihamuz

Сори догадался)
n
March 12, 2019, 4:57 p.m.
newbie.works.with.QT

Большооооое спасибо!!!!!Не передать как я вам благодарен, спасибо что всегда отзываетесь.Теперь я смогу продолжить работу в QT!!! (пробую писать бота (Я как вы могли догадаться немного не пр...
March 12, 2019, 1:20 p.m.
BlinCT

Ну так если у вас есть готовая программа так ей и воспользуйтесь. Вы же написали ее вот и пользуйтесь.
Join us in social networks

For registered users on the site there is a minimum amount of advertising