![]() |
Здравствуйте, гость ( Вход | Регистрация )
![]() |
zuze |
![]()
Сообщение
#1
|
![]() Участник ![]() ![]() Группа: Участник Сообщений: 211 Регистрация: 4.11.2012 Пользователь №: 3589 Спасибо сказали: 0 раз(а) Репутация: ![]() ![]() ![]() |
Ругаеться на строчку
Ошибка: QColor(Qt.GlobalColor): argument 1 has unexpected type 'list' QColor(int): argument 1 has unexpected type 'list' QColor(QVariant): too many arguments QColor(): too many arguments QColor(int, int, int, int alpha=255): argument 1 has unexpected type 'list' QColor(QString): argument 1 has unexpected type 'list' QColor(QColor): argument 1 has unexpected type 'list' Я пытался в интернете или в книгах найти примеры, но что-то не нашёл. Подскажите пожалуйста, как поправить? |
|
|
![]() |
lanz |
![]()
Сообщение
#2
|
![]() Старейший участник ![]() ![]() ![]() ![]() Группа: Участник Сообщений: 690 Регистрация: 28.12.2012 Пользователь №: 3660 Спасибо сказали: 113 раз(а) Репутация: ![]() ![]() ![]() |
http://docs.python.org/2/library/struct.html
Цитата struct.unpack(fmt, string) Unpack the string (presumably packed by pack(fmt, ...)) according to the given format. The result is a tuple even if it contains exactly one item. The string must contain exactly the amount of data required by the format (len(string) must equal calcsize(fmt)). unpack всегда возвращает tuple ( http://docs.python.org/2/library/stdtypes.html#typesseq ). В кратце - это немодифицируемый массив. Чтобы получить первый элемент нужно обратится к нему как к списку:
Сообщение отредактировал lanz - 25.3.2013, 8:33 |
|
|
![]() ![]() ![]() |
![]() |
|
Текстовая версия | Сейчас: 6.5.2025, 6:21 |