[Interest] How to determine at compile time that given enum type is Q_ENUMed?

2022-08-16 Thread Alexey Rochev
Hello I'm trying to specialize fmt::formatter for all Q_ENUM enums types, and for that I need to come up with constexpr bool function/variable template that somehow checks if Q_ENUM was declared for enum (to use with SFINAE). I know that QMetaEnum::fromType() fails with static_assert if Q_ENUM is

[Interest] Convert to QMetaMethod from QObject + const char *

2022-08-16 Thread Scott Bloom
I have a function that takes in a QObject and const char * signal/slot void func( ..., QObject * target, const char * member ) { logic QObject::connect( ., target, member ) ... more logic { So I can call it via func( , m_target, SLOT( ) ... it works fine I would like

Re: [Interest] How to properly terminate QtConcurrent run

2022-08-16 Thread Elvis Stansvik
Den tis 16 aug. 2022 kl 18:23 skrev Sean Murphy via Interest : > > I've encountered a bug of mine, that is leading me to ask how to properly fix > some behavior... > > The setup: I've got a worker task that runs in a separate thread, waiting for > jobs to come over from MainWindow. When that

Re: [Interest] Proper way to track mouse leaving a widgets boundary

2022-08-16 Thread Scott Bloom
Hey Scott, This should be a job for a QWidget::leaveEvent override: https://doc.qt.io/qt-6/qwidget.html#leaveEvent Volker == How did I miss that in the 20 years of Qt coding??? dang ___ Interest mailing list Interest@qt-project.org

Re: [Interest] Proper way to track mouse leaving a widgets boundary

2022-08-16 Thread Volker Hilsheimer
> On 16 Aug 2022, at 18:45, Scott Bloom wrote: > > I have a QTextEdit derived class, that sets setMouseTracking( true ) in the > constructor. Note, this isn’t about QTextEdit and should I use QTextBrowser. > Ive had this issue multiple times over the last 20 years of Qt development, > and

[Interest] Proper way to track mouse leaving a widgets boundary

2022-08-16 Thread Scott Bloom
I have a QTextEdit derived class, that sets setMouseTracking( true ) in the constructor. Note, this isn't about QTextEdit and should I use QTextBrowser. Ive had this issue multiple times over the last 20 years of Qt development, and the solution has always been the same and I am not convinced

[Interest] How to properly terminate QtConcurrent run

2022-08-16 Thread Sean Murphy via Interest
I've encountered a bug of mine, that is leading me to ask how to properly fix some behavior... The setup: I've got a worker task that runs in a separate thread, waiting for jobs to come over from MainWindow. When that worker task gets a job, it splits the jobs into smaller chunks, and then