Re: [Interest] TableWidget size dynamically

2013-05-15 Thread william.croc...@analog.com
On Wed, May 15, 2013 at 3:08 AM, Sujan Dasmahapatra sujan.dasmahapa...@gmail.com mailto:sujan.dasmahapa...@gmail.com wrote: I got a QTableWidget with 3 columns in it. How can I resize the columnwidth based on resizing my MainWindow. Currently I have set a fixed width for

Re: [Interest] Place a QWidget below a button (and follow it!)

2013-06-13 Thread william.croc...@analog.com
In details, I have a widget that will display a floating window when the user clicks on a QToolButton. This floating widget must be placed below the button that summoned its soul, and if the main window moves, the floating window must be positioned in the same place. Reimplement the

Re: [Interest] QFileDialog is lovelier the second time around...

2013-06-17 Thread william.croc...@analog.com
On 06/17/2013 09:57 AM, Duane wrote: On 6/14/2013 5:06 PM, Till Oliver Knoll wrote: Am 14.06.2013 um 23:02 schrieb Till Oliver Knolltill.oliver.kn...@gmail.com: That said, the Qt cross-platform file dialog is (was?) terribly slow with network mapped drives That's the price we pay for

Re: [Interest] Possible memory leak.

2013-06-18 Thread william.croc...@analog.com
On 06/18/2013 01:05 PM, Thiago Macieira wrote: On terça-feira, 18 de junho de 2013 08.37.18, Bill Crocker wrote: I have written a server app with Qt (4.7.1) and the image size grows over time. Valgrind found this. Are we missing a call to freeaddrinfo somewhere? No. You seem pretty sure of

Re: [Interest] Possible to know if QAction was triggered by QKeySequence or click?

2013-10-30 Thread william.croc...@analog.com
On 10/30/2013 06:12 AM, Philipp Kursawe wrote: I want to detect how users usually work with the application. Do they click more or use the shortcuts. This way we can optimize the UI. You can try installing a global event filter on the app. You would then see all events go by, some of which

Re: [Interest] QAbstractItemModel::headerData

2013-11-25 Thread william.croc...@analog.com
On 11/22/2013 02:31 PM, an...@familiesomers.nl wrote: Bill Crocker schreef op 22.11.2013 20:19: Gang: I have created my own item model by sub-classing QAbstractItemModel. Functions like rowCount take a parent index so the model knows for which index it is being asked to return the count.

[Interest] How to center the check box.

2013-12-29 Thread william.croc...@analog.com
Gang: I have a QTableView which uses a custom model based on QAbstractItemModel. The model sets the Qt::ItemIsUserCheckable flag for one of the columns and the model data() function responds to the Qt::CheckStateRole for the same column. The result is a working check box in the corresponding

Re: [Interest] How to center the check box.

2013-12-29 Thread william.croc...@analog.com
My problem is that the check box is presented flush left in the column and I would like it to be centered. The closest I could find was Qt::TextAlignmentRole which didn't sound right or have any affect. Any help would be appreciated. There is no easy way to make the check box appear

Re: [Interest] Annoying Bug - Qt 4.8.1 bug?

2014-01-23 Thread william.croc...@analog.com
I can't actually do what you suggest because the file writing is done by an external lib written by me, but which should not have Qt dependencies. Anyway, that's not the topic here: If the user can't really do anything during the duration of the save why not just show them a busy cursor. If

Re: [Interest] Annoying Bug - Qt 4.8.1 bug?

2014-01-23 Thread william.croc...@analog.com
On 01/23/2014 08:05 AM, Etienne Sandré-Chardonnal wrote: That bug is really quantic... I tried setting a QTimer to do the save/accept job automatically, and this doesn't crash anymore :( Have you tried running under Valgrind to see if it has anything to say. 4.8.5 compile in progress...

Re: [Interest] New window in Qt makes the application activate

2014-02-04 Thread william.croc...@analog.com
On 02/03/2014 11:32 PM, Mandeep Sandhu wrote: As part of a (partly mistaken) emulation of some ancient Macintosh API's I was calling QWidget::activateWindow(). If the application is not active, that both makes the window active, and it makes the application active. I guess

[Interest] Trying to build 5.2.0 on RHEL 5

2014-02-05 Thread william.croc...@analog.com
Hello: I am trying to build 5.2.0 on RHEL 5 (may god have mercy on my soul.) The compile fails down in the testlib sub-directory. In file included from /usr/include/asm-x86_64/byteorder.h:30:0, from /usr/include/asm/byteorder.h:5, from

Re: [Interest] QAbstractItemModel

2014-02-10 Thread william.croc...@analog.com
On 02/10/2014 10:26 AM, Graham Labdon wrote: Hi I have just started with QAbstractItemModel and have some doubts as to whether I am doing things in the correct way. I have class that (amongst other things) is storing a set of data that I want to display in a QTreeView. So I made a model

Re: [Interest] Always on top

2014-02-17 Thread william.croc...@analog.com
On 02/17/2014 03:49 AM, igor.mironc...@gmail.com wrote: Hi. I return to the subject of the drawing on top of the child widgets. I understand that I can’t paint on top of the child, but I can create child widgets that will be positioned to right place. But if I have parent with two child

Re: [Interest] Finished resizing a window?

2014-02-24 Thread william.croc...@analog.com
We have windows in our application that are potentially expensive to repaint, so when the user resizes a window we may need to put off repainting until the resizing is finished. It seems that we don't get mouse down/mouse up events when the user clicks in the window frame/resize grip

Re: [Interest] Finished resizing a window?

2014-02-25 Thread william.croc...@analog.com
On 02/25/2014 12:56 PM, Thiago Macieira wrote: Em seg 24 fev 2014, às 14:30:29, John Weeks escreveu: On 24-Feb-2014, at 2:24 PM, Thiago Macieira wrote: That's something entirely controlled by the window manager. Sorry. Thanks, Thiago. That's good to know. Here's a suggestion: do a delayed

Re: [Interest] QThread

2014-03-24 Thread william.croc...@analog.com
On 03/24/2014 08:10 AM, Graham Labdon wrote: Thanks for that - my ui is now responsive What is the correct way to stop my thread running? I tried m_thread-exit() but it still continues Have it periodically check a global, (mutex-protected?) variable and then terminate (by returning from the

Re: [Interest] efficient drawing advice

2014-03-26 Thread william.croc...@analog.com
On 03/26/2014 06:35 AM, Graham Labdon wrote: Hi My application needs to display a series of 'traces'. Each trace will consist of 5000+ points and there can be up to 50 traces. I would be grateful of some pointers on how to do this in the most efficient way - QPainter on a widget Use of

Re: [Interest] efficient drawing advice

2014-03-26 Thread william.croc...@analog.com
However as others have already pointed out with the usual tricks (Clever Clipping(tm), Level of Detail, ...) today's CPUs should also be able to render lines with several thousands of segments... I though I was done until I tried to send something to a printer. What works on the screen could

Re: [Interest] efficient drawing advice

2014-03-26 Thread william.croc...@analog.com
I too have a similar requirements for monotonic data plots. How do you store the full million points data? QVectordouble x, y; Do you keep all points in memory so that it is readily available when the user zooms? Yes. Bill ___ Interest mailing

Re: [Interest] efficient drawing advice

2014-03-26 Thread william.croc...@analog.com
On 03/26/2014 10:04 AM, André Somers wrote: william.croc...@analog.com schreef op 26-3-2014 14:56: I too have a similar requirements for monotonic data plots. How do you store the full million points data? QVectordouble x, y; Is that really the quickest? This means that points have

Re: [Interest] Many paint events?

2014-03-31 Thread william.croc...@analog.com
On 03/31/2014 03:24 AM, Till Oliver Knoll wrote: Am 30.03.2014 um 22:31 schrieb Brad Pepersbpep...@me.com: ... Any hints on where to look for this or maybe some other way to code this to avoid the problem? I don't know where those extra paint events come from (or why), but the most

Re: [Interest] QPainterPath issue

2014-06-20 Thread william.croc...@analog.com
On 06/20/2014 11:57 AM, VStevenP wrote: I am trying to use QPainterPath to render a graph. I draw an x and a y axis in blue, then use moveTo and QuadTo to draw a curve which crosses over the x axis. What I see is that the quadTo operation erases some of my blue x-axis pixels, specifically

Re: [Interest] Dock WIdgets

2014-06-23 Thread william.croc...@analog.com
On 06/23/2014 06:50 AM, Graham Labdon wrote: Hi I am investigating the behaviour of dock widgets. I am trying to achieve the following - 1. Have a set of tabbed dock widgets positioned at the bottom of mainWindow 2. Have each of the tabbed dock widgets floatable but not moveable 3. Have the

Re: [Interest] Server application is crashing.

2014-07-07 Thread william.croc...@analog.com
On 07/06/2014 10:19 PM, Thiago Macieira wrote: On Sunday 06 July 2014 19:46:25 Bill Crocker wrote: #0 0x083ff8ef in QResourceFileEngineHandler::create(QString const) const () #1 0x0848ffdf in QAbstractFileEngine::create(QString const) () These functions no longer exist in Qt 5 or 4.8. So

Re: [Interest] Server application is crashing.

2014-07-07 Thread william.croc...@analog.com
. Bill Cheers Dmitriy Purgin 2014-07-07 16:11 GMT+06:00 william.croc...@analog.com william.croc...@analog.com: On 07/06/2014 10:19 PM, Thiago Macieira wrote: On Sunday 06 July 2014 19:46:25 Bill Crocker wrote: #0 0x083ff8ef in QResourceFileEngineHandler::create(QString const) const () #1

[Interest] Qt Installer Framework.

2014-07-16 Thread william.croc...@analog.com
Hello: I'm trying to use the Qt Installer Framework to create an installer for Windows. Someone suggested I use installer.setDefaultPageVisible to solve a problem I was having, but I can not find any reference to that in the doc which is included with the installer. So, where is the *complete*

Re: [Interest] Qt Installer Framework.

2014-07-16 Thread william.croc...@analog.com
On 07/16/2014 09:29 AM, Sze Howe Koh wrote: On 16 July 2014 21:23, william.croc...@analog.com william.croc...@analog.com wrote: It's documented here: http://doc-snapshot.qt-project.org/qtifw-master/scripting-qinstaller.html#setDefaultPageVisible-method The *complete* documentation

Re: [Interest] Qt Installer Framework.

2014-07-16 Thread william.croc...@analog.com
On 07/16/2014 11:23 AM, Koehne Kai wrote: -Original Message- From: interest-bounces+kai.koehne=digia@qt-project.org [...] Ok. Got the source. Found the function. That gives no hint about where and when to call it. I have a simple installer with one package. I am starting with

Re: [Interest] Qt Installer Framework.

2014-07-17 Thread william.croc...@analog.com
On 07/17/2014 07:52 AM, Karsten Heimrich wrote: 1 - Remove the component selection page. 2 - Remove the use of the Start Menu. Put this in you sample .qs script: function Component() { if (installer.isInstaller()) { installer.setDefaultPageVisible(QInstaller.ComponentSelection,

Re: [Interest] Qt Installer Framework.

2014-07-17 Thread william.croc...@analog.com
3 - Remove all of the options from the uninstall page. No possible at the moment. I hope that it will be possible soon. I need a simple install/uninstall (local/non-web) and look forward to using the IFW for that purpose. Thanks. Bill -- FWIW: I would have used: if(

Re: [Interest] Application build times using Qt4 vs Qt5

2014-07-29 Thread william.croc...@analog.com
On 07/29/2014 02:22 PM, Adam Light wrote: I've noticed that compiling my application takes considerably longer when compiling using Qt5 vs. Qt 4. This is true on Macintosh 10.9 and Windows 7. I'm comparing builds done using the same machine with the same application source code. Sad fact

[Interest] Qt and Cygwin-X

2014-07-30 Thread william.croc...@analog.com
Hello: I recently upgraded from Qt4.7.1 to Qt4.8.6 When I did that, the performance of my app, when running under CygwiX, got significantly worse. Specifically: I open a putty window on my Windows laptop, connect to my Linux box and run my app using the Cygwin X server. The application appears

Re: [Interest] Qt and Cygwin-X

2014-07-31 Thread william.croc...@analog.com
I recently upgraded from Qt4.7.1 to Qt4.8.6 When I did that, the performance of my app, when running under CygwiX, got significantly worse. That's expected. Qt 4.8 uses the raster graphics engine by default, whereas Qt 4.7 ran with the native (XRender) by default. The raster engine is

Re: [Interest] QThreadPool writing to the DB

2014-08-18 Thread william.croc...@analog.com
On 08/18/2014 07:51 AM, Igor Mironchik wrote: Hi. Well, but with SQLite this approach works... Which goes to show you just how sadistic multi-threading can be. -Original Message- From: Sze Howe Koh Sent: Monday, August 18, 2014 12:57 PM To: Igor Mironchik Subject: Re: [Interest]

[Interest] What is the difference.

2014-09-22 Thread william.croc...@analog.com
Gang: While we are talking about the need for a Q[Core]Application... What is the difference between; QCoreApplication(argv,argc); and QApplication(argc,argc,false); // Note GUIEnabled=false Thanks. Bill ___ Interest mailing list

Re: [Interest] What is the difference.

2014-09-22 Thread william.croc...@analog.com
On 09/22/2014 11:10 AM, Thiago Macieira wrote: On Monday 22 September 2014 11:01:23 william.croc...@analog.com wrote: Gang: While we are talking about the need for a Q[Core]Application... What is the difference between; QCoreApplication(argv,argc); and QApplication(argc

Re: [Interest] What is the difference.

2014-09-22 Thread william.croc...@analog.com
On 09/22/2014 11:33 AM, Karl Ruetz wrote: On Sep 22, 2014, at 10:25 AM, william.croc...@analog.com wrote: On 09/22/2014 11:10 AM, Thiago Macieira wrote: On Monday 22 September 2014 11:01:23 william.croc...@analog.com wrote: Gang: While we are talking about the need for a Q[Core]Application

Re: [Interest] What is the difference.

2014-09-22 Thread william.croc...@analog.com
On 09/22/2014 11:32 AM, Thiago Macieira wrote: On Monday 22 September 2014 11:25:11 william.croc...@analog.com wrote: It creates a QApplication, which enables a bunch of backend things, without also connecting to the display server. When my normally-GUI application is run off-line

Re: [Interest] What is the difference.

2014-09-24 Thread william.croc...@analog.com
I do not remember the specifics... might have had something to do with fontconfig or the use of the QImage class. Note that this constructor is removed in Qt 5. Is that another reason why I can never use Qt 5? Karl Can't you just use QGuiApplication? I'm still on 4.8.6 trying to get

Re: [Interest] QTreeView expand/expandAll performance

2014-09-26 Thread william.croc...@analog.com
On 09/26/2014 09:33 AM, William Hallatt wrote: Hi everyone, I have just started playing with Qt’s MVC classes and have created a hierarchical model to display in a QTreeView. Some of the nodes, however, have a fair amount of children and when I expand these nodes (or, heaven forbid,

Re: [Interest] Crashing in QProcess::waitForFinished

2014-10-03 Thread william.croc...@analog.com
If you could at least give me a line number of where waitForFinished is crashing, I might be able to give you some hypotheses. I assume that requires I compile the host file with debug. Are there any tricks to copying a file out of the Qt source tree into my space and compiling that one file

[Interest] Text is not being anti-aliased.

2015-01-30 Thread william.croc...@analog.com
Hello: I have code to create a PNG file from a QGraphicsScene. When I run this on Linux, text is anti-aliased. This is good. When I run this on Windows, text is NOT anti-aliased. This is bad. I would like the text to be anti-aliased. Am I doing something wrong? Is this a Windows bug? Is there a

Re: [Interest] Text is not being anti-aliased.

2015-01-30 Thread william.croc...@analog.com
On 01/30/2015 11:56 AM, Jason H wrote: Back in Qt4, (the last time I wrestled with this issue - Win XP) there was a setting in Windows about anti-aliased fonts. Qt respected that setting, unless you explicitly told Qt to override it. I think you're in a similar situation. Sure enough, If I

Re: [Interest] Qt 5.5 and Red Hat 5

2015-03-18 Thread william.croc...@analog.com
On 03/18/2015 09:25 AM, Harri Porten wrote: On Wed, 18 Mar 2015, Thiago Macieira wrote: I'm not sure I will apply a fix to the main codebase since this is a feature added for kernel 2.6.22, almost 8 years ago. Still very much in use by certain industries who standardized on RH 5 for the

Re: [Interest] Qt 5.5 and Red Hat 5

2015-03-23 Thread william.croc...@analog.com
On 03/18/2015 04:27 PM, Scott Aron Bloom wrote: On this note.. I a large number of my customers (about 20%) of my users are STILL using CentOS 5 or RHEL 5.. In moving to Qt 5, they are now losing printing support :( They will have to print to a PDF and print external to the tool. In EDA,

Re: [Interest] Qt 5.5 and Red Hat 5

2015-03-18 Thread william.croc...@analog.com
Bill said: My sight has over 500 Linux machines. Only a handful are running RedHat 6, but we will finally be migrating over the next 6 months to a year. And when will you be deploying Qt 5.5 to that site? Probably never because I can't get it to build. Qt5 requires certain versions of

Re: [Interest] Again this problem but now on Linux

2015-05-04 Thread william.croc...@analog.com
On 05/03/2015 11:17 PM, Thiago Macieira wrote: On Monday 04 May 2015 06:08:55 Nikos Chantziaras wrote: On 03/05/15 13:54, Igor Mironchik wrote: Hi guys, I asked before about similar problem on Windows but now I have the same problem on Linux. I have messagebox.cpp file that should be

Re: [Interest] Again this problem but now on Linux

2015-05-04 Thread william.croc...@analog.com
If you define your classes in .h files (not .cpp files) and run qmake, then you don't need to #include anything that moc produces. And if I only use a Q_OBJECT based class in one .cpp file I should now have to break it out into it's own header file just to make the build system happy. I

Re: [Interest] Problem with QPixmap.

2015-04-17 Thread william.croc...@analog.com
On 04/17/2015 12:53 PM, Igor Mironchik wrote: Hi, guys. I have one problem: pixmap usb-disconnected.png doesn't draws correctly. Draws absolutely nothing. And if click on this button application crashes. What is the problem? Thank you. Have you added the .png file to your .qrc file.

Re: [Interest] Problem sizing a QWidget

2015-04-06 Thread william.croc...@analog.com
I know this is not the correct way to go, and is quite inefficient but I could not find another way. Would anyone have some suggestion on how to handle this correctly? Any help would be greatly appreciated. Looks like I did this at some point in the past:

Re: [Interest] 5.4.2 Android Misery just one typo away

2015-06-17 Thread william.croc...@analog.com
It's certainly one of the uglier gotchas people run into. Here is my humble attempt to document it more prominently: https://codereview.qt-project.org/#/c/114517/ Anyhow, adding stuff to the documentation only helps so much, since people also have to read it :) In general, I consider

Re: [Interest] [SOLVED] Text rendering problem.

2015-07-23 Thread william.croc...@analog.com
I have this working with DirectWrite on Windows, but it only appears to work when my app is built with debug mode. If I build it in release mode then it does *not* work and the text appears badly kerned. This was all my fault. (D'oh My release build was not using the intended dlls.) The

Re: [Interest] Text rendering problem.

2015-07-23 Thread william.croc...@analog.com
On 07/21/2015 01:31 PM, william.croc...@analog.com wrote: On 07/18/2015 08:02 PM, william.croc...@analog.com wrote: I am having a text rendering problem. What you can do in your example is scene_font.setHintingPreference(QFont::PreferNoHinting); It appears that one needs to use

Re: [Interest] Text rendering problem.

2015-07-21 Thread william.croc...@analog.com
On 07/18/2015 08:02 PM, william.croc...@analog.com wrote: I am having a text rendering problem. From some googling, I think it's because the hinting values are obtained when unscaled, and then used even when scaled. What you can do in your example

Re: [Interest] Text rendering problem.

2015-07-18 Thread william.croc...@analog.com
On 07/18/2015 06:34 AM, Elvis Stansvik wrote: 2015-07-18 1:13 GMT+02:00 Bill Crockerwilliam.croc...@analog.com: Hello: I am having a text rendering problem. From some googling, I think it's because the hinting values are obtained when unscaled, and then used even when scaled. What you

Re: [Interest] Text rendering problem.

2015-07-18 Thread william.croc...@analog.com
I am having a text rendering problem. From some googling, I think it's because the hinting values are obtained when unscaled, and then used even when scaled. What you can do in your example is scene_font.setHintingPreference(QFont::PreferNoHinting); Elvis: You are the mam.

Re: [Interest] QFile::size() and QTextStream::pos()

2015-10-29 Thread william.croc...@analog.com
On 10/29/2015 05:05 PM, Thiago Macieira wrote: On Thursday 29 October 2015 21:49:40 Igor Mironchik wrote: On 29.10.2015 06:51, Thiago Macieira wrote: On Thursday 29 October 2015 05:51:36 Igor Mironchik wrote: P.S. Why QTextStream doesn't have something like get(), peek(), unget(), putback()?

Re: [Interest] Memory leak problem in a Qt App

2015-10-30 Thread william.croc...@analog.com
On 10/30/2015 10:08 AM, Etienne Sandré-Chardonnal wrote: Dear all, I have an app which runs several days executing computation jobs (about one job every few minutes). In some cases, the memory consumption grows to several Gb unexpectedly. If someone is still pointing at a piece of memory

Re: [Interest] Memory leak problem in a Qt App

2015-10-30 Thread william.croc...@analog.com
Also, use techniques like QScopedPointer to simplify memory management. All this was done, especially in the QThread / QSocket part. But the app is complex and something may have been left out. I had a similar problem. You need to look for places where "things" could accumulate.

Re: [Interest] QList and erase problem...

2015-09-14 Thread william.croc...@analog.com
On 09/14/2015 11:13 AM, Igor Mironchik wrote: > Hi, > > it seems that problem not in the iterating and deletion from cantainer... > > I wrote simple test app and everything is ok. > > But something here crashes my app and only in release mode, so I can't > understand what is the problem... > > And

Re: [Interest] It is happening again.

2015-09-24 Thread william.croc...@analog.com
On 09/23/2015 04:00 PM, Thiago Macieira wrote: > On Tuesday 22 September 2015 16:09:57 Bill Crocker wrote: >> 2 - During these periods, the invalid SYN cookies number on the server >> steadily rises: >> >netstat -ts | grep SYN >> 302658 invalid SYN cookies received<--- >>

Re: [Interest] Rendering of QGraphicsSvgItem via QSvgGenerator

2015-12-13 Thread william.croc...@analog.com
On 12/13/2015 05:32 AM, Jean-Michaël Celerier wrote: Hello, I am trying to render a graphics scene that contains some QGraphicsSvgItem and some QGraphicsItem. The QGraphicsItem render correctly as SVG when I import them in inkscape, but the QGraphicsSvgItem are rendered as PNG ! Yes, I

Re: [Interest] Unnecessary repaints.

2015-12-17 Thread william.croc...@analog.com
On 12/17/2015 11:16 AM, Jason H wrote: My very first Qt app is large and a little sloppy in that the QWidget::update() function is being called *someplace* where it should not, This is causing unnecessary repaints. Is there one place I can put a break to find the calls which actually cause a

Re: [Interest] Unnecessary repaints.

2015-12-17 Thread william.croc...@analog.com
I know they are unnecessary because my app responds with multiple screen refreshes (paints) from a single user action. And for me those paints can be expensive. Did you write a widget that calls update()? I'm not sure I understand your concern. update() should only be called when a redraw

Re: [Interest] Unnecessary repaints.

2015-12-17 Thread william.croc...@analog.com
On 12/17/2015 01:53 PM, Jason H wrote: If I call: QWidget::update() and QWidget::updateGeometry() Can I assume the layout request would be processed first and then any repaints would take place. In general can I assume that all layout requests would be serviced upon

Re: [Interest] Unnecessary repaints.

2015-12-17 Thread william.croc...@analog.com
On 12/17/2015 02:40 PM, william.croc...@analog.com wrote: On 12/17/2015 01:53 PM, Jason H wrote: If I call: QWidget::update() and QWidget::updateGeometry() Can I assume the layout request would be processed first and then any repaints would take place. In general can I assume that all

Re: [Interest] Distance from point to path.

2015-12-29 Thread william.croc...@analog.com
Given a QPoint and a QPainterPath. How do I find the distance from the QPoint to the closest point along the QPainterPath. Perhaps. But you should consider that QPainterPath is, as the name suggests, primarily for painting, and not meant for solving generic geometric problems. So I'm not sure

Re: [Interest] Macro support with QTextEdit.

2016-01-09 Thread william.croc...@analog.com
How do I this using a QTextEdit widget in HTML mode with QTextCursor etc. Okay. I have made some progress using the QTextObjectInterface. Next series of questions: - If a QTextCursor spans one of my inline objects and some aspect of the font is changed, how does my object get notified. - My

Re: [Interest] Distance from point to path.

2015-12-30 Thread william.croc...@analog.com
I think Qt opened the door for geometric consideration when they invented the scene, gave items mouse-event-handlers and provided intersection based item queries. :-) Fair enough :) You could always try filing a feature request and see what people think. People will think, "What has

Re: [Interest] QTabWidget activity

2016-01-07 Thread william.croc...@analog.com
On 01/07/2016 03:44 PM, Murphy, Sean wrote: I'm trying to figure out the right way to show some feedback to the user and I'm stuck. Here's the setup: - I have a QTabWidget, that has three tabs, one for live data, one for archived data, and a third tab that doesn't having much to do with this

Re: [Interest] Macro support with QTextEdit.

2016-01-08 Thread william.croc...@analog.com
On 01/08/2016 05:40 PM, Bill Crocker wrote: Hello: I am working on a WYSIWYG editor. The user needs to be able to enter macros which render specially on the screen. For the purpose of this conversation, pretend they enter "$DATE" which displays as "8-JAN" on the screen. They are not allowed to

[Interest] Distance from point to path.

2015-12-28 Thread william.croc...@analog.com
Hello: Given a QPoint and a QPainterPath. How do I find the distance from the QPoint to the closest point along the QPainterPath. I could step along the path with pointAtPercent looking for the closest point, but that seems unduly expensive: O(100N). Any better ideas. Thanks. Bill -

Re: [Interest] Unnecessary repaints.

2015-12-17 Thread william.croc...@analog.com
Or, can you recommend a better way to diagnose this problem. (The whole thing needs to be rewritten now that I am older and wiser, but not just yet.) I'd try to log calls to update() on the widget, and dump the stacktrack for each of those to a file. You can do that (at least on gdb) by

Re: [Interest] Distance from point to path.

2015-12-29 Thread william.croc...@analog.com
On 12/29/2015 06:42 AM, Elvis Stansvik wrote: 2015-12-28 22:49 GMT+01:00 william.croc...@analog.com Given a QPoint and a QPainterPath. How do I find the distance from the QPoint to the closest point along the QPainterPath. Like Konstantin said, the best approach probably depends on whether

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

2015-11-25 Thread william.croc...@analog.com
On 11/25/2015 12:32 PM, william.croc...@analog.com wrote: I am wondering if this problem can happen again. What can possibly cause QPrinter constructor to get stuck for such a long time? For me Qt was scanning the network, building up the list of available printers. On a campus of 6

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

2015-11-25 Thread william.croc...@analog.com
I am wondering if this problem can happen again. What can possibly cause QPrinter constructor to get stuck for such a long time? For me Qt was scanning the network, building up the list of available printers. On a campus of 6 buildings and umpteen printers, that took a noticeable amount of

Re: [Interest] Macro support with QTextEdit.

2016-01-11 Thread william.croc...@analog.com
On 01/10/2016 02:59 AM, Tony Rietwyk wrote: Bill asked: Sent: Sunday, 10 January 2016 1:25 AM Next question: How do I save and restore to HTML? Hi Bill, I can't help with the saving. But we display html documents with tags and replace them with QWidgets: The HTML representation

Re: [Interest] How to create a list.

2016-01-13 Thread william.croc...@analog.com
On 01/13/2016 05:33 AM, Konstantin Tokarev wrote: 13.01.2016, 04:10, "william.croc...@analog.com"<william.croc...@analog.com>: On 01/12/2016 07:37 PM, Elvis Stansvik wrote: 2016-01-12 15:37 GMT+01:00 Bill Crocker<william.croc...@analog.com>: Hello: Could

Re: [Interest] How to create a list.

2016-01-12 Thread william.croc...@analog.com
On 01/12/2016 07:37 PM, Elvis Stansvik wrote: 2016-01-12 15:37 GMT+01:00 Bill Crocker<william.croc...@analog.com>: Hello: Could someone please show me the few lines of code required to add a list *of three elements* to a QTextDocument using low level (i.e QTextBlock, QTextCursor, QTe

Re: [Interest] Graphical edition of state machines in QT

2016-06-15 Thread william.croc...@analog.com
On 06/15/2016 04:28 AM, Willy Lambert wrote: Hi all, I'd like to use state machines to implement some of my behaviors. Is there any graphical WYSIWIG editor for state machines in QT (or any side well known project) ? Many of my coworkers like this, but there is no explicit Qt integration

Re: [Interest] QUndoStack

2016-06-24 Thread william.croc...@analog.com
On 06/24/2016 11:52 AM, Bob Hood wrote: On 6/24/2016 9:42 AM, Alan Ezust wrote: There is another thread on this very subject from last week: http://lists.qt-project.org/pipermail/interest/2016-June/023114.html http://lists.qt-project.org/pipermail/interest/2016-June/023116.html I agree with

Re: [Interest] QTabWidget activity

2016-01-08 Thread william.croc...@analog.com
On 01/08/2016 09:49 AM, Murphy, Sean wrote: I would probably prefer something like an overlay message popping up for a few seconds or (a bit nineties style) a status bar message. Another would be to have a subtle small icon overlay float from the button up to the tab. Overlay message probably

Re: [Interest] Customize QTableView selection color

2016-02-05 Thread william.croc...@analog.com
On 02/05/2016 10:34 AM, Murphy, Sean wrote: I’m still struggling with how to customize the selection color for items on a QTableView I use a QStyledItemDelegate. In the paint(painter,option,index) method I create my own QPalette based on selection etc and then call the base class paint

Re: [Interest] Add margin spacing between QComboBox item icon and text ?

2016-01-20 Thread william.croc...@analog.com
I do not remember why I added a styleSheet. Perhaps to make it more fat-finger touch-friendly for Android or iOS. Anyway, I must re-think and re-test. I always tell my customers to stay away from style sheets. They are way more trouble than what they are worth. My complaint: Some things

[Interest] Two item models.

2016-03-23 Thread william.croc...@analog.com
Hello: If I have a single data structure being presented to the world by two, separate item models and I want to "insert a row". I assume I would: 1 - call beginInsertRows on both models, 2 - insert the row in my single data structure 3 - call endInsertRows on both models. I am pretty sure I

Re: [Interest] reading from and writing to a file with QDataStream

2016-03-08 Thread william.croc...@analog.com
Sure, you can look and see that the size() of a QByteArray returns an 'int', but that is only as of today. You should get into the habit of controlling the types written to QDataStreams. Actually, for reading and writing binary data files, I think it is wise to get into the habbit of using

Re: [Interest] Regarding QtreeWidget

2016-03-04 Thread william.croc...@analog.com
On 03/04/2016 03:06 AM, Roshni Lalwani wrote: I have application in which I am planning to use a QtreeWidget . The maxinum number of elements in the treeWidget can go uptp 500 . COuld you let me how will be performance of using QtreeWidget for 500 elements . Will it lead to some performance

Re: [Interest] reading from and writing to a file with QDataStream

2016-03-07 Thread william.croc...@analog.com
On 03/07/2016 09:35 AM, Sina Dogru wrote: Well but, I am writing a QString to QByteArray, QByteArray bai; QDataStream out(, QIODevice::WriteOnly); out << QString("A QString"); And writing an 'int' and QByteArray which a QString written file.open(QIODevice::WriteOnly); QDataStream out2(); //

Re: [Interest] reading from and writing to a file with QDataStream

2016-03-07 Thread william.croc...@analog.com
int main() { // module A creates a byte array QByteArray bai; QDataStream out(, QIODevice::WriteOnly); out << QString("A QString"); // writes some information on it Some tool kits use a buffer in their version of QDataStream. You can not in general be sure that anything has actually been

Re: [Interest] reading from and writing to a file with QDataStream

2016-03-07 Thread william.croc...@analog.com
On 03/07/2016 09:19 AM, Sina Dogru wrote: 2016-03-07 15:51 GMT+02:00 william.croc...@analog.com <mailto:william.croc...@analog.com> <william.croc...@analog.com <mailto:william.croc...@analog.com>>: Some tool kits use a buffer in their version of QDataStream. You

Re: [Interest] reading from and writing to a file with QDataStream

2016-03-07 Thread william.croc...@analog.com
QDataStream out2(); // and module A write those datas to a file. out2 << bai.size(); out2 << bai; All of the following is IMHO: I think that if you are going to read the size back as an 'int' you should insure that an 'int' is written in the first place: out2 <<

Re: [Interest] Regarding QtreeWidget

2016-03-04 Thread william.croc...@analog.com
On 03/04/2016 11:24 AM, André Somers wrote: Op 04/03/2016 om 13:20 schreef william.croc...@analog.com: On 03/04/2016 03:06 AM, Roshni Lalwani wrote: I have application in which I am planning to use a QtreeWidget . The maxinum number of elements in the treeWidget can go uptp 500 . COuld you

Re: [Interest] Problem with zoomed-out qgraphicsview/scene

2016-03-29 Thread william.croc...@analog.com
On 03/29/2016 10:47 AM, David Heremans wrote: Hello, I seem to have a 'visibility problem' with my application. I have a QGraphicsscene that represents a piece of A4 paper at 300DPI (approx. 3300 by 2500 scene coordinates). On this scene I have a simple street map and some symbols. I draw the

Re: [Interest] using cmake to build Qt projects.

2016-05-04 Thread william.croc...@analog.com
On 05/04/2016 01:07 PM, Thiago Macieira wrote: On quarta-feira, 4 de maio de 2016 10:08:27 PDT Bill Crocker wrote: From my experience the symbols I am seeing are typical of missing moc files. I know I have all of my #include "abc.moc" statements in place because my project builds fine with

Re: [Interest] using cmake to build Qt projects.

2016-05-05 Thread william.croc...@analog.com
set(CMAKE_CXX_FLAGS "-m32 -pthread"). On Wed, May 4, 2016 at 7:29 PM, william.croc...@analog.com <mailto:william.croc...@analog.com> <william.croc...@analog.com <mailto:william.croc...@analog.com>> wrote: On 05/04/2016 01:07 PM, Thiago Macieira wrote: O

Re: [Interest] using cmake to build Qt projects.

2016-05-05 Thread william.croc...@analog.com
I have never been able to get creator to work. The 5 series won't even run under my versions of VNC and the NX virtual desktops. This apparently due to a dependency on new visual fluff. Qt Quick doesn't indeed not work well over VNC. The common workaround is to not load Quick based

[Interest] Syncing tree views.

2016-07-29 Thread william.croc...@analog.com
Hello: This is a desk top widgets question. No QML here. I have two QTreeView instances. They both use the same base model, but differ in subsequent layers of proxy models. What is the most convenient way to keep then in sync. When an index is selected in one, I want the corresponding index to

Re: [Interest] Syncing tree views.

2016-07-29 Thread william.croc...@analog.com
applies to items which are common to both.) KF5 has a solution for that. I'm not an Model/View expert, but i think this is what you're looking for: https://api.kde.org/frameworks/kitemmodels/html/classKLinkItemSelectionModel.html Thanks for the pointer. Alas... - I am industry and this is

Re: [Interest] Syncing tree views.

2016-07-29 Thread william.croc...@analog.com
On 07/29/2016 10:33 AM, Christoph Feck wrote: On Friday 29 July 2016 16:14:41 william.croc...@analog.com wrote: applies to items which are common to both.) KF5 has a solution for that. I'm not an Model/View expert, but i think this is what you're looking for: https://api.kde.org/frameworks

  1   2   >