farleyrunkel / qollama Goto Github PK
View Code? Open in Web Editor NEWA Cross-Platform Qt Client for ollama
License: MIT License
A Cross-Platform Qt Client for ollama
License: MIT License
Process: qollama [5236]
Path: /Users/USER/Documents/*/qollama.app/Contents/MacOS/qollama
Identifier: farley.qollama
Version: 0.1 (0.1)
Code Type: ARM-64 (Native)
Parent Process: Qt Creator [2306]
User ID: 501
Date/Time: 2024-05-23 20:22:13.3276 +0800
OS Version: macOS 14.5 (23F79)
Report Version: 12
Anonymous UUID: C1B3FD34-E290-D0A0-7DD7-631CD72B3755
Sleep/Wake UUID: 46507BEA-74DB-46F3-AD02-9153360F1281
Time Awake Since Boot: 4700 seconds
Time Since Wake: 800 seconds
System Integrity Protection: enabled
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000008
Exception Codes: 0x0000000000000001, 0x0000000000000008
Termination Reason: Namespace SIGNAL, Code 11 Segmentation fault: 11
Terminating Process: exc handler [5236]
VM Region Info: 0x8 is not in any region. Bytes before following region: 4295917560
REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL
UNUSED SPACE AT START
--->
__TEXT 1000e8000-1001e0000 [ 992K] r-x/r-x SM=COW /Users/USER/Documents/*/qollama.app/Contents/MacOS/qollama
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 QtWidgets 0x1014ae738 QScopedPointer<QObjectData, QScopedPointerDeleter>::get() const + 0 (qscopedpointer.h:112) [inlined]
1 QtWidgets 0x1014ae738 decltype(fp.get()) qGetPtrHelper<QScopedPointer<QObjectData, QScopedPointerDeleter> const>(QScopedPointer<QObjectData, QScopedPointerDeleter> const&) + 0 (qtclasshelpermacros.h:79) [inlined]
2 QtWidgets 0x1014ae738 QWidgetTextControl::d_func() const + 0 (qwidgettextcontrol_p.h:53) [inlined]
3 QtWidgets 0x1014ae738 QWidgetTextControl::textInteractionFlags() const + 0 (qwidgettextcontrol.cpp:3078)
4 QtWidgets 0x101482f20 QTextEdit::isReadOnly() const + 20 (qtextedit.cpp:2225)
5 QtWidgets 0x101330dac QStyleSheetStyle::renderRule(QObject const*, QStyleOption const*, int) const + 280 (qstylesheetstyle.cpp:2156)
6 QtWidgets 0x101345ed4 QStyleSheetStyle::pixelMetric(QStyle::PixelMetric, QStyleOption const*, QWidget const*) const + 116 (qstylesheetstyle.cpp:4968)
7 QtWidgets 0x1014a3ebc QWidgetTextControl::setCursorWidth(int) + 116 (qwidgettextcontrol.cpp:2473)
8 QtWidgets 0x1014a596c QWidgetTextControlPrivate::init(Qt::TextFormat, QString const&, QTextDocument*) + 56 (qwidgettextcontrol.cpp:401) [inlined]
9 QtWidgets 0x1014a596c QWidgetTextControl::QWidgetTextControl(QObject*) + 144 (qwidgettextcontrol.cpp:856)
10 QtWidgets 0x101481efc QTextEditControl::QTextEditControl(QObject*) + 8 (qtextedit.cpp:56) [inlined]
11 QtWidgets 0x101481efc QTextEditControl::QTextEditControl(QObject*) + 8 (qtextedit.cpp:56) [inlined]
12 QtWidgets 0x101481efc QTextEditPrivate::init(QString const&) + 64 (qtextedit.cpp:128)
13 QtWidgets 0x101483530 QTextEdit::QTextEdit(QTextEditPrivate&, QWidget*) + 64 (qtextedit.cpp:630)
14 QtWidgets 0x10148a624 QTextBrowser::QTextBrowser(QWidget*) + 156 (qtextbrowser.cpp:693)
15 qollama 0x1000f5d3c IAutoResizeTextBrowser::IAutoResizeTextBrowser(QWidget*) + 84 (ichatwidget.cpp:5)
16 qollama 0x1000f5fc4 IAutoResizeTextBrowser::IAutoResizeTextBrowser(QWidget*) + 36 (ichatwidget.cpp:6)
17 qollama 0x1000f613c IMessageWidget::IMessageWidget(QString const&, QPixmap const&, QString const&, QWidget*) + 280 (ichatwidget.cpp:38)
18 qollama 0x1000f6bc4 IMessageWidget::IMessageWidget(QString const&, QPixmap const&, QString const&, QWidget*) + 60 (ichatwidget.cpp:41)
19 qollama 0x1000f715c IChatWidget::addMessage(QString const&, QPixmap const&, QString const&) + 80 (ichatwidget.cpp:168)
20 qollama 0x100103b90 MainWindow::addMessage(QString) + 1264 (mainwindow.cpp:172)
21 qollama 0x100107cc0 QtPrivate::FunctorCall<QtPrivate::IndexesList<0>, QtPrivate::List, void, void (MainWindow::)(QString)>::call(void (MainWindow::)(QString), MainWindow*, void**)::'lambda'()::operator()() const + 160 (qobjectdefs_impl.h:153)
22 qollama 0x100107ba8 void QtPrivate::FunctorCallBase::call_internal<void, QtPrivate::FunctorCall<QtPrivate::IndexesList<0>, QtPrivate::List, void, void (MainWindow::)(QString)>::call(void (MainWindow::)(QString), MainWindow*, void**)::'lambda'()>(void**, QtPrivate::FunctorCall<QtPrivate::IndexesList<0>, QtPrivate::List, void, void (MainWindow::)(QString)>::call(void (MainWindow::)(QString), MainWindow*, void**)::'lambda'()&&) + 28 (qobjectdefs_impl.h:72)
23 qollama 0x100107b20 QtPrivate::FunctorCall<QtPrivate::IndexesList<0>, QtPrivate::List, void, void (MainWindow::)(QString)>::call(void (MainWindow::)(QString), MainWindow*, void**) + 112 (qobjectdefs_impl.h:152)
24 qollama 0x100107a64 void QtPrivate::FunctionPointer<void (MainWindow::)(QString)>::call<QtPrivate::List, void>(void (MainWindow::)(QString), MainWindow*, void**) + 80 (qobjectdefs_impl.h:200)
25 qollama 0x100107954 QtPrivate::QCallableObject<void (MainWindow::)(QString), QtPrivate::List, void>::impl(int, QtPrivate::QSlotObjectBase, QObject*, void**, bool*) + 188 (qobjectdefs_impl.h:571)
26 QtCore 0x100bfb1d0 QtPrivate::QSlotObjectBase::call(QObject*, void**) + 28 (qobjectdefs_impl.h:487) [inlined]
27 QtCore 0x100bfb1d0 void doActivate(QObject*, int, void**) + 776 (qobject.cpp:4115)
28 qollama 0x1000edfb4 IWelcomePage::send(QString) + 72 (moc_iwelcomepage.cpp:138)
29 qollama 0x1000fde00 IWelcomePage::mousePressEvent(QMouseEvent*) + 328 (iwelcomepage.cpp:29)
30 QtWidgets 0x1012ec728 QWidget::event(QEvent*) + 132
31 QtWidgets 0x1012a2218 QApplicationPrivate::notify_helper(QObject*, QEvent*) + 272 (qapplication.cpp:3298)
32 QtWidgets 0x1012a4258 QApplication::notify(QObject*, QEvent*) + 5092 (qapplication.cpp:2776)
33 QtCore 0x100baeb64 QCoreApplication::notifyInternal2(QObject*, QEvent*) + 204 (qcoreapplication.cpp:1138)
34 QtWidgets 0x1012a27b8 QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer&, bool, bool) + 808 (qapplication.cpp:2360)
35 QtWidgets 0x1013016fc QWidgetWindow::handleMouseEvent(QMouseEvent*) + 1416 (qwidgetwindow.cpp:638)
36 QtWidgets 0x101300908 QWidgetWindow::event(QEvent*) + 100 (qwidgetwindow.cpp:252)
37 QtWidgets 0x1012a2218 QApplicationPrivate::notify_helper(QObject*, QEvent*) + 272 (qapplication.cpp:3298)
38 QtWidgets 0x1012a306c QApplication::notify(QObject*, QEvent*) + 504 (qapplication.cpp:3249)
39 QtCore 0x100baeb64 QCoreApplication::notifyInternal2(QObject*, QEvent*) + 204 (qcoreapplication.cpp:1138)
40 QtGui 0x102889a28 QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) + 1760 (qguiapplication.cpp:2326)
41 QtGui 0x1028e6784 QWindowSystemInterface::sendWindowSystemEvents(QFlagsQEventLoop::ProcessEventsFlag) + 408 (qwindowsysteminterface.cpp:1114)
42 libqcocoa.dylib 0x100530a00 QCocoaEventDispatcherPrivate::postedEventsSourceCallback(void*) + 536 (qcocoaeventdispatcher.mm:922)
43 CoreFoundation 0x18861e4d8 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 28
44 CoreFoundation 0x18861e46c __CFRunLoopDoSource0 + 176
45 CoreFoundation 0x18861e1dc __CFRunLoopDoSources0 + 244
46 CoreFoundation 0x18861cdc8 __CFRunLoopRun + 828
47 CoreFoundation 0x18861c434 CFRunLoopRunSpecific + 608
48 HIToolbox 0x192dc019c RunCurrentEventLoopInMode + 292
49 HIToolbox 0x192dbfe2c ReceiveNextEventCommon + 220
50 HIToolbox 0x192dbfd30 _BlockUntilNextEventMatchingListInModeWithFilter + 76
51 AppKit 0x18be7bd68 _DPSNextEvent + 660
52 AppKit 0x18c671808 -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 700
53 AppKit 0x18be6f09c -[NSApplication run] + 476
54 libqcocoa.dylib 0x10052e594 QCocoaEventDispatcher::processEvents(QFlagsQEventLoop::ProcessEventsFlag) + 2128 (qcocoaeventdispatcher.mm:406)
55 QtCore 0x100bb93e4 QEventLoop::processEvents(QFlagsQEventLoop::ProcessEventsFlag) + 36 (qeventloop.cpp:100) [inlined]
56 QtCore 0x100bb93e4 QEventLoop::exec(QFlagsQEventLoop::ProcessEventsFlag) + 1056 (qeventloop.cpp:191)
57 QtCore 0x100baf1bc QCoreApplication::exec() + 112 (qcoreapplication.cpp:1482)
58 qollama 0x1000ff214 main + 488 (main.cpp:24)
59 dyld 0x1881b60e0 start + 2360
Thread 1:
0 libsystem_pthread.dylib 0x188539d20 start_wqthread + 0
Thread 2:
0 libsystem_pthread.dylib 0x188539d20 start_wqthread + 0
Thread 3:
0 libsystem_pthread.dylib 0x188539d20 start_wqthread + 0
Thread 4:
0 libsystem_pthread.dylib 0x188539d20 start_wqthread + 0
Thread 5:: Thread (pooled)
0 libsystem_kernel.dylib 0x1885019ec __psynch_cvwait + 8
1 libsystem_pthread.dylib 0x18853f55c _pthread_cond_wait + 1228
2 QtCore 0x100d2ff18 QWaitConditionPrivate::wait_relative(QDeadlineTimer) + 72 (qwaitcondition_unix.cpp:92) [inlined]
3 QtCore 0x100d2ff18 QWaitConditionPrivate::wait(QDeadlineTimer) + 208 (qwaitcondition_unix.cpp:100)
4 QtCore 0x100d2fdcc QWaitCondition::wait(QMutex*, QDeadlineTimer) + 108 (qwaitcondition_unix.cpp:180)
5 QtCore 0x100d2a5f4 QThreadPoolThread::run() + 792 (qthreadpool.cpp:116)
6 QtCore 0x100d22910 QThreadPrivate::start(void*)::$_0::operator()() const + 264 (qthread_unix.cpp:326) [inlined]
7 QtCore 0x100d22910 void (anonymous namespace)::terminate_on_exceptionQThreadPrivate::start(void*)::$_0(QThreadPrivate::start(void*)::$_0&&) + 264 (qthread_unix.cpp:262) [inlined]
8 QtCore 0x100d22910 QThreadPrivate::start(void*) + 336 (qthread_unix.cpp:285)
9 libsystem_pthread.dylib 0x18853ef94 _pthread_start + 136
10 libsystem_pthread.dylib 0x188539d34 thread_start + 8
Thread 6:: Thread (pooled)
0 libsystem_kernel.dylib 0x1885019ec __psynch_cvwait + 8
1 libsystem_pthread.dylib 0x18853f55c _pthread_cond_wait + 1228
2 QtCore 0x100d2ff18 QWaitConditionPrivate::wait_relative(QDeadlineTimer) + 72 (qwaitcondition_unix.cpp:92) [inlined]
3 QtCore 0x100d2ff18 QWaitConditionPrivate::wait(QDeadlineTimer) + 208 (qwaitcondition_unix.cpp:100)
4 QtCore 0x100d2fdcc QWaitCondition::wait(QMutex*, QDeadlineTimer) + 108 (qwaitcondition_unix.cpp:180)
5 QtCore 0x100d2a5f4 QThreadPoolThread::run() + 792 (qthreadpool.cpp:116)
6 QtCore 0x100d22910 QThreadPrivate::start(void*)::$_0::operator()() const + 264 (qthread_unix.cpp:326) [inlined]
7 QtCore 0x100d22910 void (anonymous namespace)::terminate_on_exceptionQThreadPrivate::start(void*)::$_0(QThreadPrivate::start(void*)::$_0&&) + 264 (qthread_unix.cpp:262) [inlined]
8 QtCore 0x100d22910 QThreadPrivate::start(void*) + 336 (qthread_unix.cpp:285)
9 libsystem_pthread.dylib 0x18853ef94 _pthread_start + 136
10 libsystem_pthread.dylib 0x188539d34 thread_start + 8
Thread 7:: Thread (pooled)
0 libsystem_kernel.dylib 0x1885019ec __psynch_cvwait + 8
1 libsystem_pthread.dylib 0x18853f55c _pthread_cond_wait + 1228
2 QtCore 0x100d2ff18 QWaitConditionPrivate::wait_relative(QDeadlineTimer) + 72 (qwaitcondition_unix.cpp:92) [inlined]
3 QtCore 0x100d2ff18 QWaitConditionPrivate::wait(QDeadlineTimer) + 208 (qwaitcondition_unix.cpp:100)
4 QtCore 0x100d2fdcc QWaitCondition::wait(QMutex*, QDeadlineTimer) + 108 (qwaitcondition_unix.cpp:180)
5 QtCore 0x100d2a5f4 QThreadPoolThread::run() + 792 (qthreadpool.cpp:116)
6 QtCore 0x100d22910 QThreadPrivate::start(void*)::$_0::operator()() const + 264 (qthread_unix.cpp:326) [inlined]
7 QtCore 0x100d22910 void (anonymous namespace)::terminate_on_exceptionQThreadPrivate::start(void*)::$_0(QThreadPrivate::start(void*)::$_0&&) + 264 (qthread_unix.cpp:262) [inlined]
8 QtCore 0x100d22910 QThreadPrivate::start(void*) + 336 (qthread_unix.cpp:285)
9 libsystem_pthread.dylib 0x18853ef94 _pthread_start + 136
10 libsystem_pthread.dylib 0x188539d34 thread_start + 8
Thread 8:: Thread (pooled)
0 libsystem_kernel.dylib 0x1885019ec __psynch_cvwait + 8
1 libsystem_pthread.dylib 0x18853f55c _pthread_cond_wait + 1228
2 QtCore 0x100d2ff18 QWaitConditionPrivate::wait_relative(QDeadlineTimer) + 72 (qwaitcondition_unix.cpp:92) [inlined]
3 QtCore 0x100d2ff18 QWaitConditionPrivate::wait(QDeadlineTimer) + 208 (qwaitcondition_unix.cpp:100)
4 QtCore 0x100d2fdcc QWaitCondition::wait(QMutex*, QDeadlineTimer) + 108 (qwaitcondition_unix.cpp:180)
5 QtCore 0x100d2a5f4 QThreadPoolThread::run() + 792 (qthreadpool.cpp:116)
6 QtCore 0x100d22910 QThreadPrivate::start(void*)::$_0::operator()() const + 264 (qthread_unix.cpp:326) [inlined]
7 QtCore 0x100d22910 void (anonymous namespace)::terminate_on_exceptionQThreadPrivate::start(void*)::$_0(QThreadPrivate::start(void*)::$_0&&) + 264 (qthread_unix.cpp:262) [inlined]
8 QtCore 0x100d22910 QThreadPrivate::start(void*) + 336 (qthread_unix.cpp:285)
9 libsystem_pthread.dylib 0x18853ef94 _pthread_start + 136
10 libsystem_pthread.dylib 0x188539d34 thread_start + 8
Thread 9:: com.apple.NSEventThread
0 libsystem_kernel.dylib 0x1884fe1f4 mach_msg2_trap + 8
1 libsystem_kernel.dylib 0x188510b24 mach_msg2_internal + 80
2 libsystem_kernel.dylib 0x188506e34 mach_msg_overwrite + 476
3 libsystem_kernel.dylib 0x1884fe578 mach_msg + 24
4 CoreFoundation 0x18861e680 __CFRunLoopServiceMachPort + 160
5 CoreFoundation 0x18861cf44 __CFRunLoopRun + 1208
6 CoreFoundation 0x18861c434 CFRunLoopRunSpecific + 608
7 AppKit 0x18bfa6188 _NSEventThread + 144
8 libsystem_pthread.dylib 0x18853ef94 _pthread_start + 136
9 libsystem_pthread.dylib 0x188539d34 thread_start + 8
Thread 0 crashed with ARM Thread State (64-bit):
x0: 0x0000000000000000 x1: 0x0000600002e44210 x2: 0x0000000000000000 x3: 0x0000000000000000
x4: 0x0000000000000003 x5: 0x0000000016c00000 x6: 0x00006000004d85a0 x7: 0x0000000102e5b6e0
x8: 0x000000012280c600 x9: 0x0000000000000031 x10: 0x0000000000000000 x11: 0x0000000000000003
x12: 0x0000000000000001 x13: 0x00000000ffffff65 x14: 0x00000000000007fb x15: 0x0000000096a4d7fb
x16: 0x0000000100bbbdc0 x17: 0x000000000000009a x18: 0x0000000000000000 x19: 0x0000000000000000
x20: 0x0000600002e44210 x21: 0x0000600000495d40 x22: 0x000000016fd14420 x23: 0x0000000000000000
x24: 0x0000600001182c50 x25: 0x00006000004a0660 x26: 0x0000000101740000 x27: 0x0000000000000000
x28: 0x00000001f0378c00 fp: 0x000000016fd14320 lr: 0x0000000101482f20
sp: 0x000000016fd14320 pc: 0x00000001014ae738 cpsr: 0x60001000
far: 0x0000000000000008 esr: 0x92000006 (Data Abort) byte read Translation fault
Binary Images:
0x10ca60000 - 0x10ca6bfff libobjc-trampolines.dylib () <9381bd6d-84a5-3c72-b3b8-88428afa4782> /usr/lib/libobjc-trampolines.dylib
0x100888000 - 0x100893fff libqsvgicon.dylib () <53290fa0-39ed-339f-be3b-660342516f60> /Users/USER//libqsvgicon.dylib
0x10c9dc000 - 0x10c9e3fff libqmacjp2.dylib () <5e64e8c6-bd8e-38ea-bdfc-3779d40dae12> /Users/USER//libqmacjp2.dylib
0x10c9c4000 - 0x10c9cbfff libqtga.dylib () /Users/USER//libqtga.dylib
0x10c9ac000 - 0x10c9b3fff libqicns.dylib () /Users/USER//libqicns.dylib
0x10c994000 - 0x10c99bfff libqpdf.dylib () /Users/USER//libqpdf.dylib
0x10dcb0000 - 0x10e47bfff org.qt-project.QtPdf (6.8) /Users/USER//QtPdf.framework/Versions/A/QtPdf
0x100984000 - 0x10098bfff libqsvg.dylib () <3bd8d956-1d98-3f9b-96ad-47fde83bab39> /Users/USER//libqsvg.dylib
0x10cb00000 - 0x10cb47fff org.qt-project.QtSvg (6.8) <46ebbc47-09be-3815-b076-c593fdec2ddd> /Users/USER//QtSvg.framework/Versions/A/QtSvg
0x10ca8c000 - 0x10caebfff libqtiff.dylib () <00cf912a-ed1e-3d29-bf6c-9cee9923ddcb> /Users/USER//libqtiff.dylib
0x101214000 - 0x10127bfff libqjpeg.dylib () <3725864b-07d8-3a00-a86d-c353209594f2> /Users/USER//libqjpeg.dylib
0x10096c000 - 0x100973fff libqmacheif.dylib () <0a8f3982-1498-3d1f-9d63-3d805d4fb99c> /Users/USER//libqmacheif.dylib
0x100954000 - 0x10095bfff libqico.dylib () <5b789c3c-72c2-3c65-863d-73f1b696c679> /Users/USER//libqico.dylib
0x1008d4000 - 0x10093ffff libqwebp.dylib () <8be5103f-0ec9-39a5-b965-3bbfd7217c0d> /Users/USER//libqwebp.dylib
0x1008bc000 - 0x1008c3fff libqwbmp.dylib () <80c63191-ce25-3472-9e42-d860576afab9> /Users/USER//libqwbmp.dylib
0x100778000 - 0x10077ffff libqgif.dylib () <685cb581-3aa6-3b11-9c4f-4163f3ff7e75> /Users/USER//libqgif.dylib
0x100738000 - 0x10075bfff libqmacstyle.dylib () <5a904e2c-8fe9-31b7-a4af-4734480c90ea> /Users/USER//libqmacstyle.dylib
0x100518000 - 0x1005b7fff libqcocoa.dylib () /Users/USER//libqcocoa.dylib
0x1007a0000 - 0x1007bffff com.apple.security.csparser (3.0) <5b38c00e-20a2-3dd5-b582-3d7bf058f0ba> /System/Library/Frameworks/Security.framework/Versions/A/PlugIns/csparser.bundle/Contents/MacOS/csparser
0x101294000 - 0x1016fbfff org.qt-project.QtWidgets (6.8) /Users/USER//QtWidgets.framework/Versions/A/QtWidgets
0x1009a8000 - 0x100acbfff org.qt-project.QtNetwork (6.8) /Users/USER//QtNetwork.framework/Versions/A/QtNetwork
0x10280c000 - 0x102e4ffff org.qt-project.QtGui (6.8) /Users/USER//QtGui.framework/Versions/A/QtGui
0x100b2c000 - 0x100fd3fff org.qt-project.QtCore (6.8) <220c56ec-57f6-3438-8e62-bb60af69ae40> /Users/USER//QtCore.framework/Versions/A/QtCore
0x1007e4000 - 0x100863fff org.qt-project.QtDBus (6.8) <1a3f014b-692d-32b9-a75d-4502a6a6f895> /Users/USER//QtDBus.framework/Versions/A/QtDBus
0x1000e8000 - 0x1001dffff farley.qollama (0.1) <65355382-f7f6-3f84-ae33-3181db87bbb2> /Users/USER/Documents//qollama.app/Contents/MacOS/qollama
0x1885a0000 - 0x188a78fff com.apple.CoreFoundation (6.9) <84b539d5-22c9-3f8c-84c8-903e9c7b8d29> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
0x192d8d000 - 0x193050fff com.apple.HIToolbox (2.1.1) <7db6c397-563f-3756-908c-e25b019a1848> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox
0x18be42000 - 0x18d17efff com.apple.AppKit (6.9) <61f710be-9132-3cc2-883d-066365fba1ad> /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
0x1881b0000 - 0x188238a17 dyld () <37bbc384-0755-31c7-a808-0ed49e44dd8e> /usr/lib/dyld
0x0 - 0xffffffffffffffff ??? () <00000000-0000-0000-0000-000000000000> ???
0x188538000 - 0x188544fff libsystem_pthread.dylib () <386b0fc1-7873-3328-8e71-43269fd1b2c7> /usr/lib/system/libsystem_pthread.dylib
0x1884fd000 - 0x188537ffb libsystem_kernel.dylib (*) <9b8b53f9-e2b6-36df-98e9-28d8fca732f2> /usr/lib/system/libsystem_kernel.dylib
I want to achieve a continuous text appending effect in the window, but the window's text only refreshes during the last text update operation, omitting the intermediate process. I debugged the code and found that the paintEvent
is only called once in a series of dataChanged
events. I would like to know how to modify my code to achieve this functionality. Below is my code:
#include <QListView>
#include <QStandardItemModel>
#include "ichatitemdelegate.h"
#include "ichatitemmodel.h"
class IChatList: public QListView
{
public:
using QListView::QListView;
public:
explicit IChatList(QWidget *parent = nullptr)
: QListView(parent)
{
setModel(new IChatItemModel(this));
setItemDelegate(new IChatItemDelegate(this));
}
void paintEvent(QPaintEvent *e) override{
QListView::paintEvent(e);
qDebug() << "void paintEvent(QPaintEvent *e)";
}
public:
void appendText(QString text) {
auto model = qobject_cast<QStandardItemModel*>(this->model());
if (!model) {
qDebug() << "Chat list model is null.";
return;
}
QStandardItem *lastItem = nullptr;
int rowCount = model->rowCount();
if (rowCount > 0) {
QModelIndex lastIndex = model->index(rowCount - 1, 0);
lastItem = model->itemFromIndex(lastIndex);
}
if (!lastItem) {
// 如果没有最后一行item,创建一个新的item并添加到模型中
lastItem = new QStandardItem();
model->appendRow(lastItem);
}
// 获取最后一个item的数据,并更新 message 字段
QVariant itemData = lastItem->data(Qt::DisplayRole);
QVariantMap chatData1 = itemData.toMap(); // 显式转换为 QVariantMap
chatData1["message"] = chatData1["message"].toString() + " " + text;
lastItem->setData(chatData1, Qt::DisplayRole);
qDebug() << "appendText:" << text;
// 发出数据变化信号,通知视图刷新
QModelIndex topLeft = model->index(0, 0);
QModelIndex bottomRight = model->index(rowCount - 1, 0);
emit model->dataChanged(topLeft, bottomRight);
repaint();
}
public:
};
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.