Re: [Interest] Harmonizing the Qt 5.x Documentation

2014-03-11 Thread Matthew Woehlke
On 2014-03-11 05:01, Pasion Jerome wrote: Short summary: We will be redirecting viewers of Qt 5.0 and Qt 5.1 documentation to Qt 5 documentation. Subsequently, we will remove the 5.0 and 5.1 documentation from qt-project.org and we will place future Qt 5.x documentation in Qt 5

[Interest] QOpenGLWidget and text

2015-04-01 Thread Matthew Woehlke
I've been working on porting a Qt4 GL application to Qt5, using the new QOpenGL classes instead of the old and deprecated QGL classes. Some of it was really easy. Some of it is requiring MASSIVE amounts of work. I refer specifically to the removal of the text rendering methods. Since these are

Re: [Interest] share opengl resource

2015-04-01 Thread Matthew Woehlke
On 2015-03-31 11:16, Alessio Mochi wrote: Actually I have two or three different rendering context (create multiple QGLWidget). Your solution for qt 4.7 is right for share resource (I would like share vbo between different rendering context)? Can you link a qt example or documentation?

Re: [Interest] unhelpful error from QFile loading non-existent resource

2015-03-26 Thread Matthew Woehlke
On 2015-03-26 12:23, Thiago Macieira wrote: On Thursday 26 March 2015 11:46:20 Matthew Woehlke wrote: Obviously, it fails. However, QFile::errorString returns Unknown error. Is there a reason for this unhelpful message as opposed to something like Resource not found? Probably just a bug

Re: [Interest] QOpenGLWidget and text

2015-04-03 Thread Matthew Woehlke
On 2015-04-02 13:45, Till Oliver Knoll wrote: Am 01.04.2015 um 20:39 schrieb Matthew Woehlke: On 2015-04-01 10:28, Giuseppe D'Angelo wrote: Il 01/04/2015 15:42, Matthew Woehlke ha scritto: If I go the route of pre-rendering the text into a QImage, what is the easiest way, using only

[Interest] QProcess performance issues

2015-05-12 Thread Matthew Woehlke
I have an application that generates a series of images (QImage) and writes them to disk as a video. I am encoding the video using an external FFmpeg process, which I start and communicate with via QProcess. I feed this the images via its stdin, using QImage::save to write them to the QProcess in

Re: [Interest] QGLWidget::drawTexture transparency woes

2015-05-12 Thread Matthew Woehlke
On 2015-05-12 12:18, Matthew Woehlke wrote: I'm trying to use QGLWidget::drawTexture to draw a texture with an alpha channel, but it is not working; the areas that should be transparent are instead black, as if the alpha channel is missing in the GL texture. Never mind... I had a shader being

[Interest] QGLWidget::drawTexture transparency woes

2015-05-12 Thread Matthew Woehlke
I'm trying to use QGLWidget::drawTexture to draw a texture with an alpha channel, but it is not working; the areas that should be transparent are instead black, as if the alpha channel is missing in the GL texture. Here's a quick sketch of what I am doing: MyWidget::initializeGL() {

Re: [Interest] QProcess performance issues

2015-05-12 Thread Matthew Woehlke
On 2015-05-12 14:21, Matthew Woehlke wrote: I have an application that generates a series of images (QImage) and writes them to disk as a video. I am encoding the video using an external FFmpeg process, which I start and communicate with via QProcess. I feed this the images via its stdin

Re: [Interest] qsort() Obsolete?

2015-04-17 Thread Matthew Woehlke
On 2015-04-17 08:17, Bo Thorsen wrote: On 04/17/2015 12:12 PM, Berkay Elbir wrote: Hello All, I want to ask a question to you to be certain. Is void qsort() function obsolete? Should we use std::sort instead of this function? Because I have a priority list and need to sort it. Slightly

Re: [Interest] QOpenGLWidget and text

2015-04-06 Thread Matthew Woehlke
On 2015-04-06 12:40, Allan Sandfeld Jensen wrote: On Monday 06 April 2015, Matthew Woehlke wrote: On 2015-04-04 05:57, Till Oliver Knoll wrote: I've never used this method myself, but from what I gather you specify the text coordinates in /window/ coordinates - /not/ world (or model

Re: [Interest] QOpenGLWidget and text

2015-04-07 Thread Matthew Woehlke
On 2015-04-06 16:19, Till Oliver Knoll wrote: Am 06.04.2015 um 17:15 schrieb Matthew Woehlke: Please don't be overly pedantic. The point isn't whether the ability is particularly a member of QOpenGLWidget, but whether it is available *at all* (in a non-deprecated class, anyway) without

Re: [Interest] QOpenGLWidget and text

2015-04-01 Thread Matthew Woehlke
On 2015-04-01 10:28, Giuseppe D'Angelo wrote: Il 01/04/2015 15:42, Matthew Woehlke ha scritto: If I go the route of pre-rendering the text into a QImage, what is the easiest way, using only the modern QOpenGL classes (since there is no longer bindTexture either), to get that into an OpenGL

Re: [Interest] Qt nntp server?

2015-06-09 Thread Matthew Woehlke
On 2015-06-08 17:43, René J.V. Bertin wrote: On Monday June 08 2015 23:14:33 Giuseppe D'Angelo wrote: can the interest ML be subscribed to gmane? It's there: nntp://news.gmane.org/gmane.comp.lib.qt.general Er... I'd hoped to post something like yes, indeed through it, but I'm only

Re: [Interest] Poor QMethod::invoke performance across threads on i.MX53

2015-05-27 Thread Matthew Woehlke
On 2015-05-18 03:46, Thiago Macieira wrote: On Thursday 14 May 2015 18:18:52 Robert Daniels wrote: moveToThread(this); This is wrong. Never do moveToThread(this), since it's very difficult to then destroy the QThread object. This is unrelated to the problem and it's probably

Re: [Interest] Interesting problem with properties.

2015-05-27 Thread Matthew Woehlke
On 2015-05-23 07:00, Igor Mironchik wrote: I have class NavigationButton that derived from QAbstractButton. NavigationButton redefines property QString: text. In my application I have one such button and initialize it with the following code: sendButton = new

Re: [Interest] Poor QMethod::invoke performance across threads on i.MX53

2015-05-27 Thread Matthew Woehlke
On 2015-05-27 16:41, Thiago Macieira wrote: On Wednesday 27 May 2015 15:02:36 Matthew Woehlke wrote: On 2015-05-18 03:46, Thiago Macieira wrote: On Thursday 14 May 2015 18:18:52 Robert Daniels wrote: moveToThread(this); This is wrong. Never do moveToThread(this), since it's very

Re: [Interest] Interesting problem with properties.

2015-05-27 Thread Matthew Woehlke
On 2015-05-27 17:23, Igor Mironchik wrote: 27.05.2015 23:41, Koehne Kai пишет: sendButton = new QtMWidgets::NavigationButton( QtMWidgets::NavigationButton::Right, QObject::tr( Send ), q ); First setText() invokes with Send text from constructor of NavigationButton, it's normal.

Re: [Interest] Poor QMethod::invoke performance across threads on i.MX53

2015-05-28 Thread Matthew Woehlke
On 2015-05-28 01:22, Bo Thorsen wrote: The finished() signal on QThread - which thread do you expect this to run in? And which thread would you expect a slot connected to it to run in? I don't understand the question. I would expect that the signal is executed in the QThread thread. I don't

[Interest] QProgressBar::reset... when it doesn't

2015-05-19 Thread Matthew Woehlke
I have a progress bar used to show that some task is executing. Some times I know how its actual progress, and sometimes I don't. When the task is done, I call QProgressBar::reset(). This is fine if I know the actual progress (value range is non-empty). When I don't (value range = [0, 0]),

Re: [Interest] libjpeg vs. libjpeg-turbo/mozjpeg

2015-05-26 Thread Matthew Woehlke
On 2015-05-23 13:50, René J.V. Bertin wrote: On Saturday May 23 2015 19:06:47 Allan Sandfeld Jensen wrote: The bug for replacing lbjpeg with libjpeg-turbo is https://bugreports.qt.io/browse/QTBUG-40091 - Feel free to take it over :) Funny how that focuses on a performance difference which

[Interest] MJPEG for HD video (was: libjpeg vs. libjpeg-turbo/mozjpeg)

2015-05-26 Thread Matthew Woehlke
On 2015-05-26 11:56, Konstantin Tokarev wrote: FWIW, MJPEG is by far not the best codec choice for HD video. That depends on how you quantify best. It's certainly not the best compression ratio, but it has significant advantages. First, it's stupid easy to implement, given the ability to save an

Re: [Interest] QEvent problem

2015-05-26 Thread Matthew Woehlke
On 2015-05-26 09:10, Berkay Elbir wrote: I want to mention an issue that I have faced. I have an event filter of a widget and when I press Delete button, event types coming to event Filter changes. [...] when I press Delete button, it sometimes [has the event type] KeyRelease instead of

Re: [Interest] QThread sleep on QMutex

2015-07-29 Thread Matthew Woehlke
On 2015-07-29 16:55, Igor Mironchik wrote: I hope that in this list I will find experts of synchronization and so on. My question: is it good to make thread's sleep on mutex like this? QMutex mutex; mutex.lock(); mutex.tryLock( int msecs ); // This will make sleep for the given timeout.

Re: [Interest] QThread sleep on QMutex

2015-07-30 Thread Matthew Woehlke
On 2015-07-30 01:43, Igor Mironchik wrote: On 30.07.2015 00:06, Matthew Woehlke wrote: Why are you doing this? If the intent is just to make the thread sleep, why not use QThread::msleep? Because in Qt 4 QThread::sleep is protected. You failed to mention that you are using Qt 4.x

Re: [Interest] Seeking tips on restoring application geometry

2015-08-04 Thread Matthew Woehlke
On 2015-08-04 03:30, alexander golks wrote: I'm kind of leaning towards saving multiple geometries in my settings based on the current desktop size, so that the user can set one geometry for the laptop-only case, set a different geometry for the external monitor(s) case, and have the

Re: [Interest] Need argumentative help..... giving qobject copy/assignment constructor and put it in qlist/qmap

2015-07-22 Thread Matthew Woehlke
On 2015-07-21 19:39, Thiago Macieira wrote: On Tuesday 21 July 2015 21:18:35 Jason H wrote: Once I was put in charge of a project where an engineer had replaced (inherited) all the Qt Q* classes used in the project to classes that did not have a 'Q' as a first letter. No other changes. And

Re: [Interest] Need argumentative help..... giving qobject copy/assignment constructor and put it in qlist/qmap

2015-07-22 Thread Matthew Woehlke
On 2015-07-22 16:52, Thiago Macieira wrote: please take a look at the list of MSVC warnings we turn off completely: http://code.woboq.org/qt5/qtbase/src/corelib/global/qglobal.h.html#897 Of those, C4275, C4514, C4800, C4097, C4786 and C4710 are stupid. I can't see anyone who wants to know

Re: [Interest] GIT / Downloading previous QtQuickControls commits

2015-10-28 Thread Matthew Woehlke
On 2015-10-28 10:40, Van Looy Detlev wrote: > I have found http://code.qt.io/cgit/qt/qtquickcontrols.git/ which > contains the commit logs for QtQuickControls, but I am not sure how > to actually access the code from these commits, is this possible to > do? I am not the most experienced with GIT

Re: [Interest] [Development] Qt static compiler error

2015-10-26 Thread Matthew Woehlke
On 2015-10-26 11:31, Thiago Macieira wrote: > On Monday 26 October 2015 15:57:30 kl222 wrote: >> Hi all: >> >> Qt statically build program is fail. >> >> libQt5Core.a depend on libpcre16 >> >> libQt5Gui.a depend on -lopengl32, -lglu32 >> >> What do I? > > You link to those libraries. > >>

Re: [Interest] Keeping track of a QDialog position

2015-10-21 Thread Matthew Woehlke
On 2015-10-19 15:36, Rollastre Prostrit wrote: > I am trying to keep track of the position of a QDialog as the user > clicks on the title and moves it around the desktop. At most, the only > thing I manage is to get a move event when the user releases the mouse. > But I need to keep track of

Re: [Interest] Can QObject::tr() be used in initialization of static const QString data members? [Qt 5.5.1, Windows]

2015-11-10 Thread Matthew Woehlke
On 2015-11-10 13:00, Thiago Macieira wrote: > On Tuesday 10 November 2015 11:31:57 Matthew Woehlke wrote: >> On 2015-11-09 17:35, Thiago Macieira wrote: >>> I advise against static QStrings altogether. Just don't do that. >> >> What's the problem with static QString

Re: [Interest] emulate windows 10 behaviour on a QT window

2015-11-11 Thread Matthew Woehlke
On 2015-11-10 16:57, Nicolas Jäger wrote: > I have to use QT5 on windows 10 (both are not my choice...), I wrote an ui > with QT, I have a > borderless window and I use a widget to make the window bar. I can move the > window around the > screen by clicking and holding the mouse button on that

Re: [Interest] emulate windows 10 behaviour on a QT window

2015-11-11 Thread Matthew Woehlke
On 2015-11-11 10:15, jagernico...@legtux.org wrote: > actually, we want to put some widgets in the window bar. For doing this, > I`m using a borderless qtmainwindow and using the toolbar as window bar. Do you really *need* to do that? Besides all the headaches you are going to have reimplementing

Re: [Interest] MSVC 2013 Bug?

2015-11-12 Thread Matthew Woehlke
On 2015-11-12 15:56, Igor Mironchik wrote: > Can you, please, explain why allocating memory when throwing exception > is bad practice? Or just can you give a link on any article about this > question Thank you. What if the exception occurred because you are out of memory? -- Matthew

Re: [Interest] Odd new-style connect()/disconnect() error with Qt 5.5.0

2015-10-14 Thread Matthew Woehlke
On 2015-10-14 14:26, Bob Hood wrote: > On 10/14/2015 12:04 PM, Elvis Stansvik wrote: >> I believe it is because QAbstractSocket::error is an overloaded >> function, so it is ambiguous in your connect/disconnect calls. It >> needs to be statically casted :/ See e.g: >> >>

Re: [Interest] Odd new-style connect()/disconnect() error with Qt 5.5.0

2015-10-15 Thread Matthew Woehlke
On 2015-10-15 03:11, André Somers wrote: > I am using this little helper for those cases: > > //tricktomakeconnectingwithQt5-styleconnectstooverloadedsignals > template struct SELECT { > template > static constexpr auto OVERLOAD_OF(R(C::*pmf)(Args...)) -> decltype(pmf)

Re: [Interest] Is here memory leaks?

2015-10-08 Thread Matthew Woehlke
On 2015-10-08 16:32, Igor Mironchik wrote: > Provide debug build with online installer :) > > I don't have so much time to build Qt from sources on my Linux > machine... This is very slow machine :) > > Qt will compile days... :) Only if your machine is quite slow. Are you using Qt as

Re: [Interest] Signal with QString argument from another thread.

2015-10-07 Thread Matthew Woehlke
On 2015-10-06 16:42, Igor Mironchik wrote: > But I had next experience. QImage is implicitly shared too. But I had > following issue: > > I had a signal like this > > void mySignal( QImage ); > > and when I tried to use this image in the slot in another thread (queued > connection was used)

Re: [Interest] Indie Mobil Program terminated?

2015-07-07 Thread Matthew Woehlke
On 2015-07-07 15:11, John C. Turnbull wrote: Ok, this is all very confusing for me. I am just starting out with Qt and am using the LGPL edition. What are my limitations with that? It costs me nothing but do I have to distribute my source code along with the app No. (Not *your* source

Re: [Interest] Indie Mobil Program terminated?

2015-07-07 Thread Matthew Woehlke
On 2015-07-07 16:14, m...@rpzdesign.com wrote: What a perfect example given below by Jason H. Go ahead and search for a QT competitor product that emphasizes that you talk to your lawyer. In fairness, how many of those competing products are LGPL licensed? That said, it is rather...

Re: [Interest] Qt 5.5.x

2015-09-11 Thread Matthew Woehlke
On 2015-09-11 13:41, Till Oliver Knoll wrote: > You can further reduce the "dependency tree" of your sources by > making use of the private "d-pointer" pattern (there is a name for > it which currently escapes me) PIMPL? ;-) https://en.wikipedia.org/wiki/Pimpl > template expansion might

Re: [Interest] Constructor of QPrinter takes 25-50 seconds to execute

2015-11-30 Thread Matthew Woehlke
On 2015-11-27 12:04, Syam Krishnan wrote: > On 11/27/2015 12:43 PM, Thiago Macieira wrote: >> 25 seconds is the exact time of a D-Bus method call timeout. 50 >> seconds would >> be two, back-to-back. > > Then that should be it. On KDE, I sometimes feel there's something wrong > with dbus because

Re: [Interest] Constructor of QPrinter takes 25-50 seconds to execute

2015-11-30 Thread Matthew Woehlke
On 2015-11-30 18:33, Thiago Macieira wrote: > On Monday 30 November 2015 17:12:43 Matthew Woehlke wrote: >> On 2015-11-27 12:04, Syam Krishnan wrote: >>> On KDE, I sometimes feel there's something wrong >>> with dbus because at times even "shutdown" (from t

Re: [Interest] Qt and remote files?

2016-01-13 Thread Matthew Woehlke
On 2016-01-13 11:06, Thiago Macieira wrote: > On Wednesday 13 January 2016 10:16:36 Matthew Woehlke wrote: >> I see that in Qt 5, QFileDialog has gained methods to work with URL's >> instead of (just) local paths. How does this work? (Does it integrate >> with e.g

[Interest] Qt and remote files?

2016-01-13 Thread Matthew Woehlke
I see that in Qt 5, QFileDialog has gained methods to work with URL's instead of (just) local paths. How does this work? (Does it integrate with e.g. KIO where supported?) And how do I go about opening or saving such a remote file via Qt? (Are they supported directly by QFile / QSaveFile, or do I

Re: [Interest] [ANN] build2 - C++ build toolchain

2016-02-10 Thread Matthew Woehlke
On 2016-02-09 04:04, Diego Iastrubni wrote: > On Mon, Feb 8, 2016 at 11:21 PM, Thiago Macieira wrote: >> qmake's philosophy is "assume everything is there and just use it". >> It's meant mostly for using Qt itself, so you can be sure that all >> of it is present. If you use third-party libraries

Re: [Interest] [ANN] build2 - C++ build toolchain

2016-02-10 Thread Matthew Woehlke
On 2016-02-09 22:43, Konstantin Podsvirov wrote: > And the Qt project provides great support CMake, how to use the frame (export > modules), and support Qt Creator IDE. Yes, Qt is practically a poster child for what projects *ought* to be doing to make themselves easy to use by other CMake

Re: [Interest] Local version control with Qt Creator on Linux

2016-01-29 Thread Matthew Woehlke
On 2016-01-28 19:48, Jason H wrote: >> I have experiences in using SVN (as client side user with Tortoise and other >> clients) and I am very satisfied with it. I am a single user and there are >> no >> plans of any team work. >> >> What version management software should I try to install in

[Interest] OT: perforce (was: Local version control with Qt Creator on Linux)

2016-01-29 Thread Matthew Woehlke
On 2016-01-28 19:54, Thiago Macieira wrote: > On Friday 29 January 2016 01:48:06 Jason H wrote: >> Perforce is free for 20 users / 20 workspaces. I really like it. The only >> issue is by default files not checked out are readonly. This causes >> problems when building for iOS/Android as the

Re: [Interest] Local version control with Qt Creator on Linux

2016-02-03 Thread Matthew Woehlke
On 2016-01-30 08:09, Bernhard Lindner wrote: > I installed git and I can see the "Git" pull-down menu in Qt Creator. I > selected the "Create Repository" menu entry and chose an empty folder. You might have better luck creating a repository where you already have your source files :-). (If

Re: [Interest] Can't login to bugreports

2016-01-21 Thread Matthew Woehlke
On 2016-01-21 11:37, Thiago Macieira wrote: > On Thursday 21 January 2016 16:18:52 Jason H wrote: >> It seems the login now requires an @, and something is amiss in my account. >> >> Can someone look into it? The password reset link isn't working. I'm not >> sure which email domain it is going to,

Re: [Interest] 80 column enforcement under Linux

2019-01-18 Thread Matthew Woehlke
On 18/01/2019 13.54, Michael Jackson wrote: > I would think that clang-format should be able to help you out with this. It > is part of the LLVM download. Ugh... clang-format... Be warned: clang-format's version of line length enforcement is *very* draconian. There is exactly one, and *only*

[Interest] Qt5 porting woes - metatype with private ctor

2019-01-07 Thread Matthew Woehlke
I have a class¹ that implements a "transferable" pointer. The idea is that it is memory-managed, but can be used in signals/slots without the overhead of an atomic reference count. It is a "throw it over the wall" type of thing, the idea being that once it is emitted as a signal argument, the

Re: [Interest] QComboBox - rect of actual menu vs widget area

2019-01-07 Thread Matthew Woehlke
On 29/12/2018 07.54, Roland Hughes wrote: > Method 1: show/hide interesting widget > > Place a label with the animated GIF at the exact same spot as the combo > box. An *animated GIF*? Ugh. No anti-aliasing, won't follow the color scheme... A better option would be to use a "busy indicator"

Re: [Interest] Qt5 porting woes - metatype with private ctor

2019-01-08 Thread Matthew Woehlke
On 07/01/2019 19.07, Thiago Macieira wrote: > On Monday, 7 January 2019 12:57:56 PST Matthew Woehlke wrote: >> Can I use std::unique_ptr in a signal? > > No. If you connected two slots to the signal, which one would get the pointer? ...whichever one is dispatched first, "nat

Re: [Interest] 80 column enforcement under Linux

2019-01-22 Thread Matthew Woehlke
On 18/01/2019 17.44, rol...@logikalsolutions.com wrote: > I was unaware Artistic Style is dead. Haven't found a line length thing > in it anyway. I am using Artistic Style for formatting because the > default QtCreator coding style and a project level .astylerc of this: Hmm... well, maybe, maybe

[Interest] Confused about GL context sharing

2019-03-28 Thread Matthew Woehlke
Let's say I have a QOpenGLWidget in a dock widget. Every time I dock or undock the dock widget, the GL widget gets a new context. I would like to use context sharing so that I only need to create my GL resources (shaders, textures, buffers) once, and reuse them as the widget is docked and

Re: [Interest] Odd crash with QPainter + QOpenGLWidget

2019-03-28 Thread Matthew Woehlke
On 27/03/2019 21.05, Thiago Macieira wrote: > On Wednesday, 27 March 2019 14:48:16 PDT Matthew Woehlke wrote: >> ==12997==by 0x598A728: QOpenGLVertexArrayObjectPrivate::destroy() >> (qopenglvertexarrayobject.cpp:212) > [...] >> ==12997== Address 0x8 is not stack'

[Interest] Odd crash with QPainter + QOpenGLWidget

2019-03-27 Thread Matthew Woehlke
I've cargo-culted some code to render text over a QOpenGLWidget from another project: void MyWidget::paintEvent(QPaintEvent* event) { QOpenGLWidget::paintEvent(event); auto const& text = /* elided */; QPainter painter{this}; painter.setPen(Qt::white);

Re: [Interest] Replacement for Qt4 QMatrix4x4?

2019-02-22 Thread Matthew Woehlke
On 22/02/2019 04.08, Paolo Angelelli wrote: > You aren't telling us much, except that you need to invert it and multiply > points with it. > If QtPositioning-private is an acceptable dependency instead of pulling in > eigen (or others), > you could probably get away with the private

Re: [Interest] Taking back a widget from a QBoxLayout?

2019-02-22 Thread Matthew Woehlke
On 22/02/2019 14.42, Jason H wrote: >>> https://doc.qt.io/qt-5/layout.html#tips-for-using-layouts > From that: > ''' > When you use a layout, you do not need to pass a parent when > constructing the child widgets. The layout will automatically > reparent the widgets (using QWidget::setParent())

Re: [Interest] Taking back a widget from a QBoxLayout?

2019-02-22 Thread Matthew Woehlke
On 22/02/2019 14.31, Jason H wrote: > addItem: Note: The ownership of item is transferred to the layout, > > and it's the layout's responsibility to delete it. > removeItem: Note: The ownership of widget remains the same as when it > was added. > > So addItem parents it as it's own, then

Re: [Interest] Replacement for Qt4 QMatrix4x4?

2019-02-22 Thread Matthew Woehlke
On 22/02/2019 11.39, Jason H wrote: > Well I think if you want such things eigen > (http://eigen.tuxfamily.org/index.php?title=Main_Page) is what you > need. However, I would love to see Qt incorporate some basic > operations. We *almost* had that with QVectorNd and QMatrixNxN... until Qt5 went

Re: [Interest] Taking back a widget from a QBoxLayout?

2019-02-22 Thread Matthew Woehlke
On 22/02/2019 15.19, Jason H wrote: > 1. > ''' > void QLayout::addItem(QLayoutItem *item) > ... > void QLayout::addWidget(QWidget *w) > Adds widget w to this layout in a manner specific to the layout. > This function uses addItem(). > ''' > > How can addWidget(QWidget *w) use addItem(QLayoutItem

[Interest] Replacement for Qt4 QMatrix4x4?

2019-02-21 Thread Matthew Woehlke
So... after a full day of debugging, trying to port my Qt4 app to Qt5 and chase down a nasty case of stack clobbering, I discovered that the problem is that QMatrix4x4 changed from qreal to float. (Uh...why? I am not particularly amused by the loss of precision, nor the extremely subtle

Re: [Interest] Confused about High-DPI icons...

2019-03-14 Thread Matthew Woehlke
On 13/03/2019 18.41, Sérgio Martins via Interest wrote: > Do you have: > > QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); Uh... *why* is that not the default? Without that, I still get a scaled UI, but it is an ugly mix of stuff that's *properly* scaled (and making use of the higher

[Interest] Confused about High-DPI icons...

2019-03-13 Thread Matthew Woehlke
I'm trying to add High-DPI icons to my application. Currently, I have a bunch of icons as resources, e.g.: :/icons/16x16/open :/icons/16x16/quit ... From reading the documentation, it *sounds* like all I should have to do is add higher resolution icons with "magic" names:

[Interest] moc: undefined interface - only on macOS?

2019-02-01 Thread Matthew Woehlke
I am trying to build https://github.com/kitware/qtextensions. It builds fine on Windows and Linux, but on macOS, I get strange errors (from moc) when trying to build the designer extensions:

Re: [Interest] moc: undefined interface - only on macOS?

2019-02-05 Thread Matthew Woehlke
On 01/02/2019 16.07, Matthew Woehlke wrote: > I am trying to build https://github.com/kitware/qtextensions. It builds > fine on Windows and Linux, but on macOS, I get strange errors (from moc) > when trying to build the designer extensions: > [snipped] > > Anyone have any i

[Interest] QMetaObject::invokeMethod thread safety

2019-05-17 Thread Matthew Woehlke
Yes, yes, I know the doc says it's thread safe, but I'm still not entirely sure about this particular example: QPointer foop; // global void bar1() { auto* foo = new Foo; foop = foo; QtConcurrent::run(); // ...later... delete foo; } void bar2() {

Re: [Interest] QMetaObject::invokeMethod thread safety

2019-05-17 Thread Matthew Woehlke
On 17/05/2019 13.47, Thiago Macieira wrote: > On Friday, 17 May 2019 10:25:15 PDT Matthew Woehlke wrote: >> IOW, I have some shared object owner by Thread 1 which is eventually >> deleted. In Thread 2, I want to queue a call to a slot on that object. > > Thread-safety

Re: [Interest] Q_ATOMIC_INT64_IS_SUPPORTED: Qt Compile errors on macOS

2019-07-03 Thread Matthew Woehlke
On 26/06/2019 21.17, Thiago Macieira wrote: > The whole reason the file exists is to avoid > having to call the compiler to find out its details every time that qmake is > started. In order to do what you are asking for, we need to call out to the > compiler, which defeats the purpose. Can't

Re: [Interest] Add row to model *with data*?

2019-08-16 Thread Matthew Woehlke
On 16/08/2019 09.27, Jérôme Godbout wrote: > Maybe you can add a type to your model and make a map of type to > Component, when initalizing the view element, use a Loader that will > create the proper Item view based on your type. Not sure this is > what you are looking for. I honestly didn't

[Interest] Add row to model *with data*?

2019-08-15 Thread Matthew Woehlke
So... I have a (subclass of) QAbstractItemModel. This class internally represents data using some other container, which has specific requirements on both the item, and on the order of items. Thus, I can't just add rows anywhere and with no data, to be filled in later. My users are intended to

Re: [Interest] Q_NAMESPACE is not portable?

2019-08-26 Thread Matthew Woehlke
On 26/08/2019 11.56, Giuseppe D'Angelo wrote: > On 26/08/2019 17:29, Matthew Woehlke wrote: >> BTW, what happened to the doc? Macros aren't class members... > > I'm thinking it's still https://bugreports.qt.io/browse/QTBUG-76822 Could be. >> (Relatedly, any word o

Re: [Interest] Static build of Qt - debug mode and plugins

2019-08-26 Thread Matthew Woehlke
On 26/08/2019 12.18, Elvis Stansvik wrote: > Den mån 26 aug. 2019 17:32Matthew Woehlke skrev: >> ...or just run `make VERBOSE=1`. > > I didn't know if he was using ninja or make, so suggested the solution that > I believe will work with both (with recent versions of CMake) :) Fair point. I'm

Re: [Interest] Q_NAMESPACE is not portable?

2019-08-26 Thread Matthew Woehlke
On 23/08/2019 19.02, Giuseppe D'Angelo via Interest wrote: > On 24/08/2019 00:10, Matthew Woehlke wrote: >> Am I doing something wrong, or is it impossible to use Q_NAMESPACE >> correctly without platform-specific PP conditionals? > > I've fixed this in 5.14, see > >&g

Re: [Interest] Static build of Qt - debug mode and plugins

2019-08-26 Thread Matthew Woehlke
On 25/08/2019 03.09, Elvis Stansvik wrote: > Den sön 25 aug. 2019 kl 02:56 skrev Thiago Macieira: >> On Saturday, 24 August 2019 10:53:45 PDT Jakub Narolewski wrote: >>> [ 1%] Linking CXX executable mrserver_debug >> >> Please expand this line. > > Jakub, to do this you can pass

Re: [Interest] Qt free software policy

2019-08-21 Thread Matthew Woehlke
On 14/08/2019 16.22, John Weeks wrote: > We are a small company selling a very large and complex application which is > now based on Qt open source. At the time we first considered porting to Qt > (version 4.3?) the license was very expensive for small company (six > programmers) and the

[Interest] Using Q_ENUM_NS?

2019-08-23 Thread Matthew Woehlke
Is it *really* impossible to use Q_ENUM_NS (in the same namespace) in more than one header? If not, how does one do so correctly? If I don't have code that looks *exactly* like this: namespace whatever { Q_NAMESPACE Q_ENUM_NS(...) } ...moc is unhappy. But if Q_NAMESPACE appears in more

[Interest] Q_NAMESPACE is not portable?

2019-08-23 Thread Matthew Woehlke
Am I missing something, or is it impossible to portably use Q_NAMESPACE? If I just use Q_NAMESPACE on its own, e.g.: namespace foo { Q_NAMESPACE } ...then I get unresolved externals on Linux. If I attempt the obvious fix: namespace foo { Q_NAMESPACE extern FOO_EXPORT const

[Interest] Why can't I sort QTreeView?

2019-09-11 Thread Matthew Woehlke
Okay, this is driving me nuts... I have a QTreeView. The model is set to a subclass of QAbstractSortFilterProxyModel, which is in turn proxying a subclass of QAbstractItemModel. I've set sortingEnabled, but for the life of me, I can't get sorting to actually work (under user control); no sorting

Re: [Interest] Why can't I sort QTreeView?

2019-09-11 Thread Matthew Woehlke
On 11/09/2019 15.52, Matthew Woehlke wrote: > I have a QTreeView. The model is set to a subclass of > QAbstractSortFilterProxyModel, which is in turn proxying a subclass of > QAbstractItemModel. > > I've set sortingEnabled, but for the life of me, I can't get sorting to > ac

Re: [Interest] Interest Digest, Vol 96, Issue 19

2019-10-02 Thread Matthew Woehlke
On 01/10/2019 20.47, Roland Hughes wrote: > If you are using XML, JSON or any of the other trendy text based > open standards for data exchange, you've made it easy for the hackers. > They don't have to put any human noodling into determining if they > cracked your transmission or not. It can be

[Interest] QInputDialog as item delegate?

2019-11-12 Thread Matthew Woehlke
I have a QTreeView. For one of the columns, rather than editing the data in-place, I want to pop up a QTextEdit. (For now, I'm hoping I'll be able to use QInputDialog, but I may end up needing to roll my own.) Is it reasonable to execute the dialog (QDialog::exec()) in an override of

Re: [Interest] TLS/SSL XML encryption security

2019-10-17 Thread Matthew Woehlke
On 17/10/2019 09.56, Roland Hughes wrote: > This presents the perfect challenge. Once "The Mother Road" it is now > difficult to navigate having many turns, stops and 30 MPH stretches. > Most importantly there are huge sections without cellular/wireless > coverage. Some sections satellite coverage

Re: [Interest] TLS/SSL XML encryption security

2019-10-07 Thread Matthew Woehlke
On 04/10/2019 20.17, Roland Hughes wrote: > On 10/3/19 5:00 AM, Matthew Woehlke wrote: >> On 01/10/2019 20.47, Roland Hughes wrote: >>> To really secure transmitted data, you cannot use an open standard which >>> has readily identifiable fields. Companies needing gr

Re: [Interest] Signal/Slot connection fails, even though QMetaObject::activate is called

2020-02-17 Thread Matthew Woehlke
On 16/02/2020 21.33, Max Paperno wrote: > Happened to stumble upon this clazy check while searching on a > completely different issue. > Seems to explain the reasoning pretty well. > > https://github.com/KDE/clazy/blob/master/docs/checks/README-connect-3arg-lambda.md Thanks for sharing the link!

Re: [Interest] Signal/Slot connection fails, even though QMetaObject::activate is called

2020-02-17 Thread Matthew Woehlke
On 15/02/2020 00.40, Max Paperno wrote: > On 2/14/2020 11:19 PM, Tony Rietwyk wrote (in part): >> Both overloads have the following warning: > > No they don't... Looking at doc.qt.io for 5.14 anyway. Only the one with > `context` has the part about the context being destroyed (emphasis mine): >

Re: [Interest] Why doesn't my model filter update?

2020-02-18 Thread Matthew Woehlke
On 18/02/2020 16.16, Marian Beermann wrote: > Are you emitting dataChanged for the relevant roles? A Qt view would > not, generally, care about data changes for user-defined roles, for example. "The filter *does* have filterRole set correctly". That wasn't the problem. -- Matthew

Re: [Interest] Why doesn't my model filter update?

2020-02-18 Thread Matthew Woehlke
On 18/02/2020 16.31, Konstantin Shegunov wrote: > On Tue, Feb 18, 2020 at 11:20 PM Matthew Woehlke wrote: >> I wonder if anyone else can spot it? ;-) > > Without knowing anything about the code at all, my best guess based on a > very quick glance would be the range for the da

Re: [Interest] Why doesn't my model filter update?

2020-02-18 Thread Matthew Woehlke
On 18/02/2020 15.35, Matthew Woehlke wrote: > I have a QAbstractItemModel. I also have a QSortFilterProxyModel acting > as a filter for the model, which in turn is used to feed a QTreeView. > The filter accepts or rejects rows based on a custom data role of the > source model. >

[Interest] Why doesn't my model filter update?

2020-02-18 Thread Matthew Woehlke
I have a QAbstractItemModel. I also have a QSortFilterProxyModel acting as a filter for the model, which in turn is used to feed a QTreeView. The filter accepts or rejects rows based on a custom data role of the source model. However, when the source model's data changes, the tree view does not

Re: [Interest] Signal/Slot connection fails, even though QMetaObject::activate is called

2020-02-14 Thread Matthew Woehlke
On 07/02/2020 19.10, Tony Rietwyk wrote: > Does it work if you don't pass 'this' as the third argument to connect?  > I never use that particular overload of connect. I usually pass the > lambda as the third argument. That scares me. The third argument is the context in which the slot runs, i.e.

Re: [Interest] Fwd: Re: Signal/Slot connection fails, even though QMetaObject::activate is called

2020-02-14 Thread Matthew Woehlke
On 07/02/2020 21.37, Jonathan Purol wrote: > After manually removing every line of code to see when a MVCE would > work, I found a loose `blockSignals(true)` flying around that was there > from a debugging session. `git diff`? Stuff like this is why you should use a VCS (it doesn't have to be

Re: [Interest] Why doesn't my model filter update?

2020-02-19 Thread Matthew Woehlke
On 18/02/2020 18.38, Sze Howe Koh wrote: > The last valid row index is (rows-1), not (rows). Right  > Do I get the other half-cookie? Sure →  -- Matthew ___ Interest mailing list Interest@qt-project.org

Re: [Interest] Qt and Open Source

2020-04-09 Thread Matthew Woehlke
On 09/04/2020 08.28, Florian Bruhin wrote: Today, The Qt Company released a quick statement: https://www.qt.io/blog/qt-and-open-source The Qt Company is proud to be committed to [...] open source, and the Qt governance model. Recent actions: [A]fter more and more moves against the

Re: [Interest] QVariant compare operator

2020-04-21 Thread Matthew Woehlke
On 20/04/2020 12.21, André Pönitz wrote: On Mon, Apr 20, 2020 at 10:04:38AM -0400, Matthew Woehlke wrote: On 19/04/2020 08.23, André Pönitz wrote: QVariant(TypeA) and QVariant(TypeB) can be ordered for different TypeA and TypeB based e.g. on alphabetical order of their .typeName(). If wanted

Re: [Interest] QVariant compare operator

2020-04-20 Thread Matthew Woehlke
On 19/04/2020 08.23, André Pönitz wrote: QVariant(TypeA) and QVariant(TypeB) can be ordered for different TypeA and TypeB based e.g. on alphabetical order of their .typeName(). If wanted, this can be refined to make e.g. all integral types comparable. No: int{5} <=> JsonObject{...} =>

  1   2   >