Re: [Interest] Build Issues with QT 6.2.3

2022-02-06 Thread Bob Hood

On 2/5/2022 4:15 PM, BeneschTech LLC wrote:
I have to say, not thrilled with the change to cmake/ninja, but maybe I'm 
just old and not "cool" LOL.


You're not alone.

___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Dumping compiler flags

2021-12-22 Thread Bob Hood

On 12/21/2021 8:43 AM, Konrad Rosenbaum wrote:

Hi,

On 21/12/2021 15:53, Bob Hood wrote:
I seem to recall, in the dim, distant past, using a Qt utility (qmake?) to 
display the compiler flags that were used to build the Qt version.  Am I 
remember that correctly? If so, can somebody give me the command line for 
displaying that info?


Indirectly: "qmake -query" will tell you all the directories where you find 
parts of Qt and the QMAKE_SPEC that will be used for your own projects - 
usually Qt was build with the same spec. What exact compiler flags will be 
used is something that you'll find inside the definition of that spec.


You find the spec definition in $QT_HOST_DATA/mkspecs/$QMAKE_SPEC/qmake.conf 
you have to follow all the includes as well as $QT_HOST_DATA/mkspecs/q*.pri


If you really want the compile settings of Qt and not the ones you should 
use for your own project, then you need access to the actual Qt build 
directory where you'll find those settings in the cache files.


...at least that's all I'm aware of. Maybe someone else knows a magic bullet 
merchand? ;-)


It must have been another package I was thinking of, then.  I recall being 
able to retrieve the exact build flags for the framework, which could then be 
applied verbatim to the project that depended upon it to ensure parity.  For 
some reason I thought that was Qt, but it must have been before I discovered 
it so many years ago.


Thanks so much for your reply, Konrad.
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


[Interest] Dumping compiler flags

2021-12-21 Thread Bob Hood
I seem to recall, in the dim, distant past, using a Qt utility (qmake?) to 
display the compiler flags that were used to build the Qt version.  Am I 
remember that correctly? If so, can somebody give me the command line for 
displaying that info?

___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Another Qt disappointment

2021-05-04 Thread Bob Hood

On 5/3/2021 8:44 AM, Jason H wrote:

I have a load cell. It's a sensor that measures weight. I wanted to make a 
quick UI for it in Qt.
That went as expected. Then I wanted to put the app on a spare Amazon Fire 
tablet rather than tie up a computer with it.

I was running with Qt 5.15.2, but there's. bug with Bearer in Qt 5.15.2, so I 
went to update it, and lo and behold, there is no 5.15.3. It's apparently, 
commercial-only. So I figured I'd finally update to Qt 6, except that after 
installing, it turns out Qt 6.0 doesn't have androidextras.

It's not just me that is disappointed, everyone in the comments at 
https://www.qt.io/blog/commercial-lts-qt-5.15.3-released seems disappointed 
that 5.15.3 is commercial-only.

So as I sit here waiting for Qt 6 and Qt 5.15 to uninstall, and Qt 5.12 to 
install, I figured that I'd drop this note about how things are going the wrong 
way.


I believe the post in early January (titled "Qt 5.15 pull out of open 
source?!") made a similar observation, and served as the snowball which ended 
with the late unpleasantness.


Let's be real: It was a blatantly stupid decision to cut off open source 
support within the /production/ 5.15 line.  Compound that with some of the 
licensing decisions made with Qt6, and it leaves me, both personally and 
professionally, with a distrust of TQC's road map for Qt.  I'm hesitant now to 
base any software designs on it because of this new baggage.
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] L Word

2021-04-29 Thread Bob Hood

On 4/29/2021 4:02 AM, Bernhard Lindner wrote:

Obviously, Qt has nothing to do with this type of software engineering. And 
it's obviously
not suitable for functional safety (at least not if you take it seriously).


If this statement is true /and/ Roland's statement that TQC actively courted 
that industry is also true, then it seems to me that he has a valid grievance, 
regardless of how he presents it.


___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Qt 6.0.0 released

2020-12-09 Thread Bob Hood

On 12/9/2020 6:53 AM, Tino Pyssysalo wrote:


Hi,

Philippe – you are right. Qt 6 is available for customer under new 
subscription licenses, Qt 6 is not included in the legacy Qt licenses.





Well, that's a shame--although not a surprise, considering the licensing 
controversies occurring late in the Qt5 life cycle. I deliberately avoided 
using Qt for developing mobile apps because of that, so luckily I didn't get 
caught in that trap.


I'll have to consider alternatives for new desktop projects.
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Fw: Aw: Re: Re: Re: OSX codesign question

2020-04-09 Thread Bob Hood

On 4/8/2020 9:29 AM, "Alexander Carôt" wrote:

P.S.: I might have overlooked this info:
*Software Distribution Reminder*

If you're generating your first Developer ID certificate, the software that 
you sign it with must be notarized by Apple in order to run on macOS 10.14.5 
or later. Learn how to submit your software for notarization 



Phhhewww --- well, this is all pretty annoying - OSX used to be easy and 
straight-forward but well - I will have to live with it and now look what 
they want in terms of "notarization".


Honestly, it seems to me like a cash-grab under cover of "security theatre".  
Now that they've locked down the macOS desktop, ostensibly to check for 
"malware", it is my understanding that you have to have a paid developer 
account ($99/year minimum) just to allow your programs to run on their desktop 
operating system without blocking it and nagging the user about it.  Yes, the 
users can still Cmd-right-click on an app (or some such key sequence) to 
bypass Gatekeeper, but most Apple users are not going to remember (or want to 
remember) to do that every time.  And, of course, Apple users will always 
blame the developer, not the manufacturer.


It's a fact that iPhone sales have been steadily decreasing every year since 
Jobs' death, and Apple's business model was almost entirely centered around 
it.  So, Apple is having to come up with new revenue streams (can you say 
"Apple Credit Card"?), and this just seems like another to me.




___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Tooltips and Anchors with QSyntaxHighlighter

2020-01-24 Thread Bob Hood
Just to add to the list: 
https://www.riverbankcomputing.com/software/qscintilla/download/


I have integrated 2.11.3 into a (WIP) Qt Widgets project, linked as a shared 
library, and it was extremely easy.




On 1/22/2020 5:47 AM, rol...@logikalsolutions.com wrote:


Quoting Jonathan Purol:



I should note this is my first time posting to a mailing list, so
apologies if I'm messing up something.


Welcome



We're currently trying to write an editable text editor which has two
modes, edit and view. In edit mode you can make changes using a specific
syntax, and in view mode that is rendered with your usual text-editor
things.
The following features ought to be supported:


I don't have a specific answer for you but I want to point you to existing 
projects before you burn a lot of time re-inventing the wheel yet again.


KATE - The K Advanced Text Editor
https://kate-editor.org/get-it/

At one time it was written with Qt, probably still is since there is now a 
Windows version.


KDevelop is somewhat based on KATE lately.
https://www.kdevelop.org/

While I, as a professional author and writer, find it completely useless, 
Calligra Words is written with Qt.

https://www.calligra.org/words/

What you really need to do is find the KWord (now abandoned for that ghastly 
Calligra thing). It was OpenSource and a highly usable word processor 
supposedly written with Qt having most of the features you want. Might start 
with this.

https://github.com/KDE/koffice

A very scaled down Qt based word processor, KWrite
https://kde.org/applications/utilities/org.kde.kwrite

Other than having Qt in the name I don't think this has any place in the 
discussion. I just wanted to be reminded of it tomorrow when I have time to 
look at it (I get this list in digest form)

https://www.ssuiteoffice.com/software/qtwriterexpress.htm

Wow! I had forgotten about Oasis
https://discuss.haiku-os.org/t/little-and-incomplete-word-processor-with-odt-support/3985 



You also might want to tip Mr. Gott and use FocusWriter. I use FocusWriter 
for stand alone things not requiring formatting. (It has some formatting, 
but is really there to get the words down in distraction free mode. Very 
handy when kick starting what will become a new book.) Mr. Gott actively 
develops the package.

https://gottcode.org/focuswriter/

My point is, unless you or your project is suffering from a horrible case of 
NIH (Not Invented Here) there are plenty of OpenSource Qt based text editors 
and word processors out there. Most/many of them are abandoned projects ripe 
for forking. some aren't abandoned but should be. Juffed comes to mind here.

http://juffed.com/en/?i=1
Don't install it on a Ubuntu based distro. Always seems to need to install 
some incompatible Qt stuff which breaks other things on your system.


Take a look at TEA. A very actively developed Qt based thing originally 
started by a journalist in Russia who couldn't find a word processor that 
worked like his mind or so the fable goes. It even supports the obsolete 
platforms of Windows and OS/2!

http://tea-editor.sourceforge.net/
http://semiletov.org/tea/




___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] QGraphicsObject::boundingRect() called with different instance

2019-10-31 Thread Bob Hood

On 10/31/2019 3:07 AM, Giuseppe D'Angelo wrote:

Il 31/10/19 01:55, Bob Hood ha scritto:

I'm on Windows using Qt Creator 4.6.2.


Apart from MSVC working on porting ASAN, there's a memory error detector 
available as part of Intel Studio.


To me, valgrind/ASAN is still a _huge_ reason to prefer Linux development. 
If you can, get a testcase and run it in a Linux VM under valgrind/ASAN.


My 2 c,



Not happening under Linux using Qt 5.13.1/Qt Creator 4.10.0.  I get the 
properly initialized value in the boundingRect()/paint() overrides.


It would appear to be a bug in the prior versions of Qt that I'm using on 
Windows (5.11/5.12).  I'll get that platform updated just to be sure.


Thanks for the help, guys.
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] QGraphicsObject::boundingRect() called with different instance

2019-10-30 Thread Bob Hood
(Sorry for the slow reply.  F#@$ing Comcast decided yesterday that all my 
mailing list traffic was Spam.)



On 10/30/2019 5:17 AM, Giuseppe D'Angelo via Interest wrote:

On 30/10/2019 01:47, Bob Hood wrote:
When I enter the constructor, I have a specific ‘this’ pointer that has the 
provided ‘size’ argument placed into its ‘entity_size’ member. However, 
when Qt subsequently invokes the boundingRect() override function, it’s an 
entirely different ‘this’ instance whose ‘entity_size’ has clearly not been 
initialized.


I’ve looked at several select examples/widgets/graphicsview/ sources, and 
those show that this should be working as expected.


I’ve tested this with 5.11.1 and 5.12.3 with the same result, so I’m 
guessing this is some kind of pilot error on my part.




Did you already run this code into valgrind / ASAN?



Thanks for the reply, Giuseppe.

I'm on Windows using Qt Creator 4.6.2.

___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


[Interest] QGraphicsObject::boundingRect() called with different instance

2019-10-29 Thread Bob Hood
I’m sure I’m being dense here, but I’m confused about why my QGraphicsItem 
subclass is being called with a different instance when the overrides of the 
boundingRect() and paint() functions are being called. Here’s the code…


Header:

|class Entity : public QGraphicsObject { Q_OBJECT public: explicit 
Entity(const QString& name, const QSizeF& size); QRectF boundingRect() const 
override; void paint(QPainter *painter, const QStyleOptionGraphicsItem 
*option, QWidget *widget) override; private: QSizeF entity_size; QString 
entity_name; }; |


Module:

|Entity::Entity(const QString& name, const QSizeF& size) : entity_name(name), 
entity_size(size) { setAcceptHoverEvents(true); setFlag(ItemIsFocusable, 
true); setFlag(ItemIsSelectable, true); setFlag(ItemIsMovable, true); } QRectF 
Entity::boundingRect() const { return QRectF(QPointF(0,0), entity_size); } 
void Entity::paint(QPainter *painter, const QStyleOptionGraphicsItem* 
/*option*/, QWidget* /*widget*/) { ... } |


Main:

|... scene = ScenePointer(new QGraphicsScene(-200, -200, 400, 400)); Entity* 
entity = new Entity("Box", QSizeF(100, 100)); entities.push_back(entity); 
entity->setPos(-150, -130); scene->addItem(entity); view = ViewPointer(new 
QGraphicsView(scene.data())); view->setRenderHint(QPainter::Antialiasing); 
view->setViewportUpdateMode(QGraphicsView::BoundingRectViewportUpdate); 
view->setBackgroundBrush(QColor(230, 200, 167)); 
setCentralWidget(view.data()); ... |


…and here’s the problem…

When I enter the constructor, I have a specific ‘this’ pointer that has the 
provided ‘size’ argument placed into its ‘entity_size’ member. However, when 
Qt subsequently invokes the boundingRect() override function, it’s an entirely 
different ‘this’ instance whose ‘entity_size’ has clearly not been initialized.


I’ve looked at several select examples/widgets/graphicsview/ sources, and 
those show that this should be working as expected.


I’ve tested this with 5.11.1 and 5.12.3 with the same result, so I’m guessing 
this is some kind of pilot error on my part.


​
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] equivalent of python glob

2019-08-23 Thread Bob Hood

On 8/23/2019 9:03 AM, Thiago Macieira wrote:

On Friday, 23 August 2019 07:38:56 PDT Bob Hood wrote:

e.g., QDirIterator iter(base_folder, QStringList() << "*.*", QDir::Files,
QDirIterator::Subdirectories);

"*.*" is "all files containing a dot" (and not in the first character) and the
vast majority of files in /usr/bin don't.


Yeah, sorry, that was from Windows code.

___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] equivalent of python glob

2019-08-23 Thread Bob Hood

On 8/23/2019 12:46 AM, Hamish Moffatt wrote:

Hi,

In Python one can write the expression: glob.glob("/usr/bin/*") and get a 
list of such files. I am looking for something similar in Qt (in C++).


I have look at QDir::entryList() and entryInfoList(), but it seems I would 
have to extract the path first and provide it to QDir. I can't use 
QDir('/').entryList({ "/usr/bin/*" }), as it returns nothing.


Look at QDirIterator.

e.g., QDirIterator iter(base_folder, QStringList() << "*.*", QDir::Files, 
QDirIterator::Subdirectories);

___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Clarification on network security

2019-06-16 Thread Bob Hood
Let me thank everybody for responding, and providing such helpful insights.  
Some--like creating Private CA, as Steve pointed out--I wasn't even aware was 
possible. I certainly have much to consider before beginning this next project.


As for what I'm securing, it's certainly not bitcoin transfers or secret 
government formulas :).  Aside from simple JSON info, part of what I expect to 
be serving are images that the user may wish to consider proprietary.  It is 
the transfer of these images that I wish to protect, at least to some degree, 
so the user has confidence that nobody else will be viewing them.  The 
industry demographic for this solution is far from cutthroat, so I don't even 
think securing them would be necessary, but if I can work it in up front, it 
will (at a minimum) be a selling point for its use.


Again, thanks for all the excellent feedback.
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


[Interest] Clarification on network security

2019-06-13 Thread Bob Hood
I've specialized in client/server solutions in my career, stretching all the 
way back to System V sockets on real, pre-Linux UN*X system, and culminating 
with today's Qt release.  In that time, I've never really been concerned 
with--nor implemented--anything but internal, home-grown security (e.g., 
encoding/encrypting data at the software layer /before/ passing it to the 
socket).  I looked for "dummy" guides on using SSL-based communications, but 
they all seem to be Apache- and CA-centric in their approaches.  If I may, I'd 
like to call upon the brain trust here to provide some guidance on securing 
communications that don't necessarily fall within the Apache/Web Server solution.


Given the following hypothetical scenario:

   Server: Custom Qt-based back-end linked with the current version of
   OpenSSL using QSslSocket for incoming connections.
   Client: PC or mobile, which may or may not be based on the Qt framework.

I have the following questions:

1. By itself, is the implicit use of OpenSSL by the QSslSocket class on the 
server side sufficient to secure data communications between both endpoints?  
In other words, would the QSslSocket challenge from the server be recognized 
and responded to by the client if the client were also using just OpenSSL?


2. If OpenSSL alone is not sufficient, is a CA-based certificate 
required/usable in this kind of scenario?


3. If a certificate is required, and both ends are "owned" by the same 
provider (i.e., I wrote the software at both ends), would a self-signed 
certificate be sufficient for securing communications between the endpoints?


Pardon my ignorance if any of these questions don't make sense. That's why I'm 
asking.  :)


I appreciate any personal insights or edifying links.

___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] [PySide] PySide2 installer for windows?

2019-05-20 Thread Bob Hood

On 5/20/2019 4:49 PM, Frank Rueter | OHUfx wrote:
I know that, the problem is I work in an industry that has been clinging 
onto Python 2.7 with al their major softwares for way too long, it has not 
been my choice.


As do I, and as do many others.  Python 2.7.x is not simply going to disappear 
with a *POOF* on 1 January.  I personally never get any reports from customers 
regarding bugs in Python 2.7.x; I update to the latest patch release simply 
out of reflex and courtesy.


Since the Python team is planning the last patch release (2.7.18) /on/ 1 
January, this version will be around for some time to come, at least a year 
from now, if not more.  Yes, we should be herding our customers into the 
Python 3 corral, however, due to the massive number of assets customers have 
that represents thousands of man-hours of work, there is a need to support 
Python v2.7.x through the remainder of its life, and start conditioning those 
customers to the finality of it in the (somewhat near) future.


Now, as for PySide2, somebody may have already pointed this out, but they are 
not supporting Windows/Python 2.7.x because that version of Python is being 
built (the interpreter build distributed by Python.org, that is) using Visual 
Studio 2008. This is incompatible with Qt v5.12.x.  However, Python 2.7.x can 
be built using VS2017--I do it myself with each patch update I provided to my 
customers--which means, if you /really/ want to use PySide2 with Python 2.7.x 
under Windows, you can go to the effort of building all of them yourself with 
the same toolchain, and it will work.  It's just that the Python.org team 
won't update from Visual Studio 2008 so close to EOL, and the Qt Company won't 
(and probably can't in the first place) patch Qt 5.12.x to work with Visual 
Studio 2008.  The two will never meet.
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] PySide2 installer for windows?

2019-05-17 Thread Bob Hood

On 5/17/2019 2:58 PM, Thiago Macieira wrote:

On Friday, 17 May 2019 10:16:04 PDT Bob Hood wrote:

They have (prematurely, imo) abandoned the combination of Windows + Python
v2.7.  You will only be able to install PySide2 under Windows with Python
v3.x now.

Less than 7 and a half months of support for Python 2 left, until it EOLs,
after a 5 year extension. Everyone has migrated their business critical
applications to Python 3 by now, right?




Well, to me "7 and a half months...left" is not EOL, and I don't know 
precisely when Python v2/Windows support was jettisoned, but you can add that 
difference to the duration as well.That's how I personally define "prematurely."


But the decision is made; I'm not instigating a brush war over it.  I'm not 
invested in PySide2, and neither are my customers. It was just going to be a 
convenience for them as long as we continued to support Python v2.  Now it won't.


___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] PySide2 installer for windows?

2019-05-17 Thread Bob Hood
They have (prematurely, imo) abandoned the combination of Windows + Python 
v2.7.  You will only be able to install PySide2 under Windows with Python v3.x 
now.


Found that out recently when I too went looking for installers.


On 5/16/2019 5:57 PM, Frank Rueter | OHUfx wrote:

Hi all,

we are trying to install PySide2 on Windows 10.
We tried installers from here
http://download.qt.io/snapshots/ci/pyside/5.9/latest/pyside2/
and here
http://download.qt.io/snapshots/ci/pyside/5.12/latest/pyside2/

But neither seem to work.
I remember just running a pip install last December:
pip install -v 
--index-url=http://download.qt.io/snapshots/ci/pyside/5.9/latest/ pyside2 
--trusted-host download.qt.io


But that does not find any installer anymore either.
So I tried this:
pip install -v 
--index-url=http://download.qt.io/snapshots/ci/pyside/5.12/latest/ pyside2 
--trusted-host download.qt.io


and just got an error:

ERROR: Could not find a version that satisfies the requirement pyside2 (from 
versions: none)

Cleaning up...
Removed build tracker 
'c:\\users\\render\\appdata\\local\\temp\\pip-req-tracker-mjz7ju'

ERROR: No matching distribution found for pyside2


What am I missing?

Cheers,
frank

--

ohufxLogo 50x50 
	*vfx compositing  | *workflow 
customisation and consulting * *

**
   


Your gateway to over 1,000 free tools... right inside of Nuke 




___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Using a QAbstractScrollArea

2019-03-22 Thread Bob Hood

On 3/22/2019 3:53 PM, Konstantin Shegunov wrote:
On Fri, Mar 22, 2019 at 8:25 PM Bob Hood <mailto:bho...@comcast.net>> wrote:


How do I use this as a concrete Qt class type?  Do I inherit from
QScrollArea
and then somehow change my parent to it?  Or do I have to inherit from the
third-party class, and then recreate the entire QScrollArea interface so it
"quacks" like a QScrollArea instance?


Hi!
What I usually do is to promote a placeholder that's as close to the custom 
widget as it can be. It's _probably_ going to work if you place a 
QScrollArea as placeholder and then promote it you your custom type (and 
don't modify its properties too heavily from the designer), but in case it 
doesn't you can always use a QWidget.


Hi back!  :)

I actually tried this before posting.  I placed a QScrollArea into Qt 
Designer, and then promoted it to a custom class that inherits the from the 
third-party class that inherits from QAbstractScrollArea.  Designer didn't 
complain, but when I tried to compile, the promoted class was missing the 
setWidgetResizeable() method that QScrollArea provides (since Designer assumes 
QScrollArea is the base class).


QAbstractScrollArea just seems like an odd base class to use, unless there's a 
design reason I'm missing (which is entirely possible).
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


[Interest] Using a QAbstractScrollArea

2019-03-22 Thread Bob Hood
I'm having a bit of a brain fart here.  I have a third-party class I'd like to 
use that inherits from QAbstractScrollArea.  Qt Designer only knows about a 
QScrollArea, though, which inherits QAbstractScrollArea.


How do I use this as a concrete Qt class type?  Do I inherit from QScrollArea 
and then somehow change my parent to it?  Or do I have to inherit from the 
third-party class, and then recreate the entire QScrollArea interface so it 
"quacks" like a QScrollArea instance?


Thanks for kicking me in the head.  :)
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] vs. Flutter

2019-02-19 Thread Bob Hood

On 2/18/2019 7:40 AM, René Hansen wrote:
I've not come across any myself, and have only built a few small things with 
it a bit for now.


Initial reactions was that it is *leagues* ahead of Qt with regards to 
developer experience. You're not locked to an IDE, like with QtCreator, and 
the ui live updates across device, simulators, emulators etc. when you write 
changes. No need to build and .apk and wait for a build+deploy.


There's no JS involved. It's Dart all the way. It doesn't even ship with a 
web runtime afaik.


I've been studying it for a while now, and I've decided that it will likely be 
my mobile development language.  I love Qt to death for desktop, but I've 
never been able to take to it's declarative approach.  I know others swear by 
it, but it just never fit my brain waves for some reason.


I saw somebody in this thread moan about it being yet another language to 
learn.  Putting aside the fact that a robust developer should know more than 
one, Dart is quite familiar to anybody who has used a modern scripting 
language (e.g., Python).


For me personally, Flutter's "feel" just fits mobile better in my mind than Qt.

___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] What are you using for continuous integration?

2019-02-13 Thread Bob Hood

On 2/12/2019 4:05 PM, Nuno Santos wrote:

Hi,

I’m curious about what you Qt heads are using for continuous integration.


We have been using TeamCity (v9) for many years now to great effect.  We are 
using the "free" version, which is limited to only 3 agents, but running 
multiple servers (Production, Private, etc.) for each layer of our pipeline.


___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] QFontDialog & macOS 10.14: Font family is always ".SF NS Text"

2019-01-29 Thread Bob Hood

Reported as a bug.

On 1/26/2019 11:01 AM, Bob Hood wrote:
I'm using QFontDialog on macOS 10.14 with Qt 5.11.1.  No matter what font 
family or point size I select, the QFont family() and toString() methods are 
returning only ".SF NS Text" for the family, and pointSize() only returns 
13.  Under Windows, same code returns the correct family/point size.


I checked macOS 10.14 sing FontBook, and all the fonts listed are actually 
installed.


Bug in 5.11.1?  Or am I doing something wrong?  The code is really simple:

...
bool ok = false;
QFont font = QFontDialog::getFont(, this);
...

The "ok" parameter is always true after the call.


___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


[Interest] QFontDialog & macOS 10.14: Font family is always ".SF NS Text"

2019-01-26 Thread Bob Hood
I'm using QFontDialog on macOS 10.14 with Qt 5.11.1.  No matter what font 
family or point size I select, the QFont family() and toString() methods are 
returning only ".SF NS Text" for the family, and pointSize() only returns 13.  
Under Windows, same code returns the correct family/point size.


I checked macOS 10.14 sing FontBook, and all the fonts listed are actually 
installed.


Bug in 5.11.1?  Or am I doing something wrong?  The code is really simple:

   ...
   bool ok = false;
   QFont font = QFontDialog::getFont(, this);
   ...

The "ok" parameter is always true after the call.

___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Qt and Open SSL

2018-10-14 Thread Bob Hood

On 10/14/2018 6:42 PM, Christopher Probst wrote:

Hello Everybody,

To enable SSL support I have added my own compiled version of ssleay32.dll 
and libeay32.dll to the Qt lib path. It seems to work fine.


My question regards these two other libs mentioned in the Qt documentation 
(http://doc.qt.io/qt-5/ssl.html) :

-lcrypto
-lssl,



These are the "new-style" library names beginning with OSS v1.1.0.  You have 
compiled a version prior to that, which produces the "old-style" names.


"libeay32" is now "libcrypto"
"ssleay32" is now "libssl"

Most recent versions of Qt5 will only link to/work with v1.1.0+ OpenSSL builds.

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Drawing a background image in QTreeWidget [SOLVED]

2018-08-06 Thread Bob Hood
Solved it.  Drawing in the viewport's rectangle instead of the event's keeps 
the background image properly positioned and updated when selections change:


   void SeatTree::paintEvent(QPaintEvent *event)
   {
    // draw in the viewport rectangle coordinates instead of the
    // event's to keep the background image properly updated

   *QRect r = viewport()->rect();*

    QPainter painter(viewport());
   painter.fillRect(r, palette().base());

    int left = r.width() - server_image.width();
    int top = r.height() - server_image.height();
   painter.drawPixmap(left, top, server_image);

    painter.end();

   QTreeWidget::paintEvent(event);

   event->accept();
   }


On 8/3/2018 12:31 PM, Bob Hood wrote:
I am (whimsically) trying to draw a background image in a QTreeWidget.  I 
have this simple code working in a QTreeWidget subclass:


SeatTree::SeatTree(const QString& prefix, QWidget *parent)
    : QTreeWidget(parent)
{
    server_image = QPixmap(QString(":/images/%1_Server.png").arg(prefix));

    image_dimensions.setX(server_image.width());
    image_dimensions.setY(server_image.height());

    QPalette pal = viewport()->palette();
    pal.setColor(QPalette::Base, Qt::transparent);
    viewport()->setPalette(pal);
}

void SeatTree::paintEvent(QPaintEvent *event)
{
    QPainter painter(viewport());
    painter.fillRect(event->rect(), palette().base());

    // added this predicate to prevent the image from being drawn
    // in the confines of row
    if(event->rect().width() >= image_dimensions.x() &&
   event->rect().height() >= image_dimensions.y())
    {
    int left = event->rect().width() - server_image.width();
    int top = event->rect().height() - server_image.height();
    painter.drawPixmap(left, top, server_image);
    }

    painter.end();

    QTreeWidget::paintEvent(event);

    event->accept();
}

And this draws the image exactly as I expect it to.  However, the rows of 
the Tree damage the background image in various scenarios, and it does not 
get corrected unless the entire Tree gets re-drawn.


Do I need to move this action into another painting function, e.g. the 
drawTree() method of a QTreeView, to get it to show without being damaged?  
Or can I do this with some additional acrobatics in the QTreeWidget 
paintEvent()?


Thanks for any insights.


___ Interest mailing list 
Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest


___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] Drawing a background image in QTreeWidget

2018-08-03 Thread Bob Hood
I am (whimsically) trying to draw a background image in a QTreeWidget.  I have 
this simple code working in a QTreeWidget subclass:


   SeatTree::SeatTree(const QString& prefix, QWidget *parent)
    : QTreeWidget(parent)
   {
    server_image = QPixmap(QString(":/images/%1_Server.png").arg(prefix));

    image_dimensions.setX(server_image.width());
    image_dimensions.setY(server_image.height());

    QPalette pal = viewport()->palette();
    pal.setColor(QPalette::Base, Qt::transparent);
    viewport()->setPalette(pal);
   }

   void SeatTree::paintEvent(QPaintEvent *event)
   {
    QPainter painter(viewport());
    painter.fillRect(event->rect(), palette().base());

    // added this predicate to prevent the image from being drawn
    // in the confines of row
    if(event->rect().width() >= image_dimensions.x() &&
   event->rect().height() >= image_dimensions.y())
    {
    int left = event->rect().width() - server_image.width();
    int top = event->rect().height() - server_image.height();
    painter.drawPixmap(left, top, server_image);
    }

    painter.end();

    QTreeWidget::paintEvent(event);

    event->accept();
   }

And this draws the image exactly as I expect it to.  However, the rows of the 
Tree damage the background image in various scenarios, and it does not get 
corrected unless the entire Tree gets re-drawn.


Do I need to move this action into another painting function, e.g. the 
drawTree() method of a QTreeView, to get it to show without being damaged?  Or 
can I do this with some additional acrobatics in the QTreeWidget paintEvent()?


Thanks for any insights.
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Start windows desktop app from a service

2018-08-01 Thread Bob Hood

On 7/30/2018 8:33 AM, Duane via Interest wrote:
I need to keep a desktop application running on a server.  I can detect that 
it's running but what's the best way to restart it using Qt?  This will 
mostly run on Windows and I expect issues running the service as admin and 
starting the application as logged on user.


Since it will mostly be Windows, does it need to be a Windows service?  Or 
even involve Qt at all?  Why not create a Task Scheduler entry to monitor the 
desktop application at intervals (say 10 seconds), and restart it when it 
stops?(hint: This is one of the ways that Microsoft keeps its automatic update 
system service running constantly under Windows 10) Instead of a Windows 
service, you could simply make the Qt program a stand-alone console app that 
the Task Scheduler launches to perform the monitoring.


I would imagine other platforms (OS X, Linux) have similar scheduling 
mechanisms.
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] 5.11.1 link error with OpenSSL (Windows)

2018-07-26 Thread Bob Hood

On 7/26/2018 6:53 PM, Bob Hood wrote:

On 7/26/2018 5:47 PM, Bob Hood wrote:
I'm not using OPENSSL_LIBS to "override the default library names."  
Perhaps I should do that and see if it changes the results.


No.  Made no difference.  Same link errors.

I'll try rebuilding the OSSL libraries.


Ah, found something telling in the build log:

Q:\Qt\openssl_64_dll_110h\lib\libssl.lib : warning LNK4272: library machine 
type 'x64' conflicts with target machine type 'x86'
Q:\Qt\openssl_64_dll_110h\lib\libcrypto.lib : warning LNK4272: library machine 
type 'x64' conflicts with target machine type 'x86'


Something ain't right here.  :)

I'll move on for now.  Sorry for the bother.
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] 5.11.1 link error with OpenSSL (Windows)

2018-07-26 Thread Bob Hood

On 7/26/2018 5:47 PM, Bob Hood wrote:
I'm not using OPENSSL_LIBS to "override the default library names."  Perhaps 
I should do that and see if it changes the results.


No.  Made no difference.  Same link errors.

I'll try rebuilding the OSSL libraries.

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] 5.11.1 link error with OpenSSL (Windows)

2018-07-26 Thread Bob Hood

On 7/26/2018 4:20 PM, Thiago Macieira wrote:

On Thursday, 26 July 2018 14:56:13 PDT Bob Hood wrote:

I'm trying three different versions of OpenSSL -- 1.0.2l, 1.0.2o, 1.1.0h --

First of all, three is wrong. There are only two that are valid: latest 1.0
and latest 1.1. Anything else is not a valid option. You should never release
any software with an old version of OpenSSL and you must always upgrade it
when OpenSSL updates.



From what I can see on the OpenSSL web site[1], 1.0.2o and 1.1.0h /are/the 
latest in those lines.  The only other one available is "1.1.1-pre8", which 
I'm assuming is not a release version.




and none of them will link correctly with Qt 5.11.1.  The "known issues"
wiki page[1] indicates something with Linux that suggests installing an
older version of OpenSSL (specifically, 1.0 is mentioned). Would this also
apply to Windows as well?  It's not explicitly mentioned in these issues.

I've built previous versions of Qt with these OpenSSL 1.0.2 libraries.

You need to make sure that the detection is correct. If you try to change
between 1.0 and 1.1, you need to blow away your Qt build and reconfigure.



I build from clean extractions of the source archive every time, and blow away 
the folder after the build completes (whether successful or unsuccessful).  
This is not an issue.




Once you've configured, please check whether it detected the right version.
The file mkspecs/modules/qt_lib_network.pr will have "opensslv11" in either
the "QT.network.enabled_features" or "QT.network.disabled_features" variable.


I don't have a "qt_lib_network.pr" file.  I have "qt_lib_network.pri" in that 
folder, and it contains the following after the build fails to link with OpenSSL:


   QT_MODULE_BIN_BASE = Q:/Qt/build/64_dll/qtbase/bin
   QT_MODULE_INCLUDE_BASE = Q:/Qt/build/64_dll/qtbase/include
   QT_MODULE_LIB_BASE = Q:/Qt/build/64_dll/qtbase/lib
   QT_MODULE_HOST_LIB_BASE = Q:/Qt/build/64_dll/qtbase/lib
   include(Q:/Qt/build/64_dll/qtbase/mkspecs/modules-inst/qt_lib_network.pri)
   QT.network.priority = 1
   
include(Q:/Qt/build/64_dll/qtbase/mkspecs/modules-inst/qt_lib_network_private.pri)
   QT.network_private.priority = 1

It doesn't contain Qt.network.* anything, even though configuration tests 
report:

   Checking for OpenSSL... yes
   Checking for OpenSSL 1.1 support... yes
   ...
   OpenSSL  yes
   Qt directly linked to OpenSSL  yes
   OpenSSL 1.1  yes

I'm not using OPENSSL_LIBS to "override the default library names."  Perhaps I 
should do that and see if it changes the results.



[1] https://www.openssl.org/source/

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] 5.11.1 link error with OpenSSL (Windows)

2018-07-26 Thread Bob Hood
I'm trying three different versions of OpenSSL -- 1.0.2l, 1.0.2o, 1.1.0h -- 
and none of them will link correctly with Qt 5.11.1.  The "known issues" wiki 
page[1] indicates something with Linux that suggests installing an older 
version of OpenSSL (specifically, 1.0 is mentioned). Would this also apply to 
Windows as well?  It's not explicitly mentioned in these issues.


I've built previous versions of Qt with these OpenSSL 1.0.2 libraries.

Example errors:

...
qsslsocket_openssl_symbols.obj : error LNK2019: unresolved external symbol 
_sk_num referenced in function "int __cdecl q_sk_num(struct stack_st *)" 
(?q_sk_num@@YAHPAUstack_st@@@Z)
qsslsocket_openssl_symbols.obj : error LNK2019: unresolved external symbol 
_sk_value referenced in function "void * __cdecl q_sk_value(struct stack_st 
*,int)" (?q_sk_value@@YAPAXPAUstack_st@@H@Z)
qsslsocket_openssl_symbols.obj : error LNK2019: unresolved external symbol 
_sk_new_null referenced in function "struct stack_st * __cdecl 
q_sk_new_null(void)" (?q_sk_new_null@@YAPAUstack_st@@XZ)
qsslsocket_openssl_symbols.obj : error LNK2019: unresolved external symbol 
_sk_free referenced in function "void __cdecl q_sk_free(struct stack_st *)" 
(?q_sk_free@@YAXPAUstack_st@@@Z)

...

Configured with:

configure -opensource -confirm-license -prefix Q:\Qt\5.11.1\64_dll -mp 
-release -nomake examples -no-qml-debug -no-compile-examples -nomake tests 
-openssl-linked -I Q:\Qt\openssl_64_dll_102o\include -L 
Q:\Qt\openssl_64_dll_102o\lib -opengl desktop


(of course, the OpenSSL folders are different for each version I've tried)

[1] https://wiki.qt.io/Qt_5.11.0_Known_Issues

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] QML: Authoritative guide

2018-02-24 Thread Bob Hood

Is "Qt5 Cadaques" ebook[1] still the most authoritative QML guide available?

[1] http://qmlbook.github.io/

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Building Qt 5.9 with Visual Studio 2017 and C++14 support

2018-02-18 Thread Bob Hood

On 2/18/2018 4:12 PM, Thiago Macieira wrote:

On Sunday, 18 February 2018 14:55:20 PST Bob Hood wrote:

Is there some special trick to getting Qt 5.9.4 to build with Visual Studio
2017 using C++14?

No. C++14 is always enabled with MSVC 2017. That also means you can't turn it
off, which in turn means the -c++std option is irrelevant.


So I can't use that option with Visual Studio 2017.  Visual Studio 2017 is
supposed to provide C++14, but my buildis stating:

 ...
 Checking for C++14 support... no
 ...
 Using C++ standard . C++11
 ...

The Qt ABI is the same whether Qt itself was compiled with C++11, 14 or 17, in
all supported compilers. So the -c++std option is really irrelevant and you
should never set it. Please ignore it and ignore the output that configure
prints.

In any case, what it prints is just a side-effect of there being no way to
tell the compiler which version to target. So configure detects it does
support C++11 features we need and can't turn anything else further on, so
reports C++11.

Note that the /std:c++latest option to the compiler should not be used. It's
imperfectly implemented and is known to break Windows SDK headers, so Qt is
not tested with the option. If you choose to use the option and something
breaks, you get to keep both pieces. However, if you fix the breakage, patches
will be appreciated.

Finally, please note that due to disagreements with Microsoft's compiler team
on some  C++14 feature detection mechanisms, Qt headers will conclude the
feature is absent. Please redirect your complaints about __has_include and the
detection macros to Microsoft. They are aware of the subject and it seems they
will implement the rules as all the other compilers do in the future, but I
don't have a timeline for you. If you really want those features, put pressure
on them or use another compiler. Also, you can still use them in your code.


Well...ok, then.  :)


Thanks for the info, and for putting up with Microsoft.
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] QML vs Electron

2018-02-16 Thread Bob Hood

I want to thank all the respondents for such an interesting discussion.

I think René made some interesting observations regarding the massive 
community support for JS in term of package managers, frameworks and UI 
toolkits.  I think that is something that really presents a high bar of entry 
for QML, that everybody wanting to use it must basically roll their own.  As I 
pointed out, coming from a widget-rich environment to something where I must 
create my own has always kept me from adopting QML as my cross-device 
framework of choice.  I have to focus on writing the interface itself first 
before I can focus on writing my application logic.With widgets, I drop them 
in, and only focus on interface writing if I want to customize them.


Nikos pointed out:


Electron forces you to write the entire application in JS.


That kind of struck me.  All of JavaScript's flaws notwithstanding, how could 
writing your application in a single language for all target devices be a bad 
thing?  Couple that with the massive community and its support (as René 
observed) and I think it is one of the driving factors that are causing 
frameworks like Electron to rise, and QML to languish as an option.


It seems like the Qt Company had a great idea, but once it was realized, they 
expected that it would just pick up steam on its own without any further 
effort on their part.  Certainly, it has its supporters here, but I can't see 
it being a viable alternative to things like Electron unless it is /fostered/ 
by the Qt Company.  As René pointed out:


It's about growing the ecosystem through marketing and outreach, while 
lowering the bar of entry by building better primitives and tooling for 
working with Qt. It is something that the JS world has been exceedingly good at.


I would argue the same thing for "QML" if the Qt Company expects more adoption 
of it.  Otherwise, people are turning to easier-entry alternatives like Electron.
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] QML vs Electron

2018-02-14 Thread Bob Hood

On 2/14/2018 8:21 PM, Jason H wrote:



Sent: Wednesday, February 14, 2018 at 8:45 PM
From: "Bob Hood" <bho...@comcast.net>
To: "Qt Interest" <interest@qt-project.org>
Subject: [Interest] QML vs Electron

I'm starting to see more and more software being written in, or being ported
to, Electron[1] (e.g., Skype's latest v8 update now uses Electron).  I know
QML is supposed to be Qt's solution to cross-device development, so I'm
wondering if anybody here has had opportunity to actually use both, and what
insights they might have in terms of comparing QML's declarative design to
Electron's HTML5 approach.

I cannot think of a worse programming paradigm. The problem it solves is there is a lot 
of HTML/CSS/JS "talent" out there. That's it. I reject DOM and CSS as the best 
way to do structure and presentation, and JS is a terrible language.


Full disclosure: I'm a hard-core Qt C++ developer, and I've made no secret of
the fact that I'm not crazy about QML.  However, it's getting harder and
harder to avoid having to be cross-device in my development, and while I know
Qt Widgets can run on mobile devices, but it seems like a heavy weight and
somewhat inelegant approach.  Something more designed for the task might be my
only/better option.

I don't see how having a web browser render everything isn't the most heavy 
weight approach imaginable.


On a related note, has anybody done a QML (e)book yet that is focused on its
uses in cross-device development?  The last/only one I saw seemed to focus
only using QML to create interfaces from scratch, and that just turned me off,
coming from the widget-rich environment of Qt desktop.

Widgets are nice, I love them still, but QML is hardware accelerated to the 
core with proper threading. It is unfortunate that QML's UI elements are so 
terrible at actually working and being rendered consistently, as widgets were. 
If we could do widgets in QML, that would be the way to go. The layouts were so 
choice.

Having done X-Platform mobile in Android Native and Qt 2013-2017, it's 
sometimes just easier to just throw it all away and roll your own. The 
platforms have bog differences, there are no physical back buttons on iPhones, 
so you need UI space to compensate. On the good side, this is easy, on the bad 
side, it's not as simple as widgets were - where everyone had the same input 
hardware. On the good side, it is popular to have your own app UI, and there is 
no real platform standard UI layout like widgets had. I so wish I could throw 
something together like in the old days. But UI designers would not have jobs, 
even though the UIs are far less consistent than old. On the flip side, they 
look a hell of a lot better.

Anyway, you can lament it, but that ship has sailed.
If you really want to know what I'm thinking, it would be to ditch JS entirely 
and use ChaiScript in QML.



Thanks for the response, Jason.

If I understand your salient point here, you're advocating the "traditional" 
approach of just maintaining device-specific, not-necessarily-related code 
bases that duplicate the same application functionality?  So, use the 
per-platform accepted coding frameworks -- C# for Android, ObjC for iOS, Qt 
for dekstops, etc. -- and just develop the required expertise in each area?


___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] QML vs Electron

2018-02-14 Thread Bob Hood
I'm starting to see more and more software being written in, or being ported 
to, Electron[1] (e.g., Skype's latest v8 update now uses Electron).  I know 
QML is supposed to be Qt's solution to cross-device development, so I'm 
wondering if anybody here has had opportunity to actually use both, and what 
insights they might have in terms of comparing QML's declarative design to 
Electron's HTML5 approach.


Full disclosure: I'm a hard-core Qt C++ developer, and I've made no secret of 
the fact that I'm not crazy about QML.  However, it's getting harder and 
harder to avoid having to be cross-device in my development, and while I know 
Qt Widgets can run on mobile devices, but it seems like a heavy weight and 
somewhat inelegant approach.  Something more designed for the task might be my 
only/better option.


On a related note, has anybody done a QML (e)book yet that is focused on its 
uses in cross-device development?  The last/only one I saw seemed to focus 
only using QML to create interfaces from scratch, and that just turned me off, 
coming from the widget-rich environment of Qt desktop.


[1] https://electronjs.org/
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] QFileDialog not localizing in Qt 5.4.2

2018-02-05 Thread Bob Hood

On 2/4/2018 9:14 PM, Thiago Macieira wrote:

On domingo, 4 de fevereiro de 2018 11:52:20 PST Boudewijn Rempt wrote:

On Sunday, 4 February 2018 18:44:52 CET Thiago Macieira wrote:

On Sunday, 4 February 2018 09:32:24 PST Bob Hood wrote:
Has anybody else had problems with this?Might I be doing something 
incorrectly? 
What OS is that? 
That's the native OSX or macOS file dialog. 

Is macOS running in Japanese?


Since they are a major reseller of our product in the Japanese market, and are 
located in Tokyo, I would feel comfortable answering yes to that question.


___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] QFileDialog not localizing in Qt 5.4.2

2018-02-04 Thread Bob Hood

(Sorry for the late reply...on a plane all afternoon)

On 2/4/2018 10:44 AM, Thiago Macieira wrote:

On Sunday, 4 February 2018 09:32:24 PST Bob Hood wrote:
Has anybody else had problems with this?Might I be doing something 
incorrectly? 

What OS is that?


As Boudewjin points out, it is OS X.  The customer points out that the Windows 
version works correctly.


___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Integrate crypto in Qt project

2018-01-08 Thread Bob Hood

Ah, went to the wrong Google search result.  :)


On 1/8/2018 2:10 PM, Jason H wrote:



Sent: Monday, January 08, 2018 at 1:52 PM
From: "Marian Beermann" <pub...@enkore.de>
To: interest@qt-project.org
Subject: Re: [Interest] Integrate crypto in Qt project

On 08.01.2018 19:14, Bob Hood wrote:

On 1/8/2018 8:39 AM, Jason H wrote:

I've used CryptoCpp (as someone else mentioned) with Qt...

The last release of that (5.6.5) was 15 months ago.  Might be a dead
project.


Crypto++ is under active development.

Very active. https://github.com/weidai11/cryptopp (~ 2days ago: "Add C++20 testing 
to cryptest.sh")

"The next release is close. It was planned for about now, but it has
slipped. Uri, Marcel and I were just talking about it.

The holdup is safe curves - curve25519 and ed25519. As soon as they are
integrated we will move to release.

Jeff"
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Integrate crypto in Qt project

2018-01-08 Thread Bob Hood

On 1/8/2018 8:39 AM, Jason H wrote:

I've used CryptoCpp (as someone else mentioned) with Qt...


The last release of that (5.6.5) was 15 months ago.  Might be a dead project.

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] PostgreSQL cross compile for Pi

2017-10-09 Thread Bob Hood

On 10/9/2017 2:30 PM, Giuseppe D'Angelo wrote:

Il 09/10/2017 21:37, Roland Hughes ha scritto:

While we are on the topic, here is the lovely response.

http://www.logikalsolutions.com/wordpress/wp-content/uploads/2017/10/Screenshot_20171009_143236.png 



No Sir By God! Not gonna look at a blog post with screen shots and 
everything in it. Wants it cut & pasted into a text only box.


There is a reason for this, which is: the knowledge about the bug stays 
within Qt's systems. What if we submit a change to fix something, 
referencing the blog post, and then that post disappears? We would've lost a 
lot of important information about what the bug was and why the fix made 
sense. So please take the 2 minutes necessary to copy the information 
in the bug report itself.



And they marked it RESOLVED!


Huh? It's clearly not resolved?


We use JIRA as well, and it is our practice to close reports with comments 
(like the one Roland has pointed out) when we need more information.  The user 
(reporter) gets notified of the closure, and the request for info is included 
with that notification. The user can reply to the notification, which then 
re-opens the issue.


It may be that the Trolls are using the same workflow, so you need only reply 
with the additional info, and the issue report will be re-opened.  By the same 
token, if you never reply, then it stays closed and off their radar.


___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Qt 5.9.0 and OpenSSL 1.1.0f

2017-05-31 Thread Bob Hood

On 5/31/2017 12:48 PM, Konstantin Tokarev wrote:

31.05.2017, 21:12, "Thiago Macieira" <thiago.macie...@intel.com>:

On Wednesday, 31 May 2017 09:51:20 PDT Bob Hood wrote:
 However, when I try to build Qt 5.9.0 using OpenSSL 1.1.0f (current 
release)  with this configuration: 
1.1 is not supported. Don't try. 

Use latest release from 1.0.2 series instead.



Thanks, Konstantin.  I'll build and use that version instead.
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Qt 5.9.0 and OpenSSL 1.1.0f

2017-05-31 Thread Bob Hood

On 5/31/2017 12:12 PM, Thiago Macieira wrote:

On Wednesday, 31 May 2017 09:51:20 PDT Bob Hood wrote:
However, when I try to build Qt 5.9.0 using OpenSSL 1.1.0f (current 
release) with this configuration: 

1.1 is not supported. Don't try.


Well.. that would explain that.  :)

Thanks, Thiago.
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] Qt 5.9.0 and OpenSSL 1.1.0f

2017-05-31 Thread Bob Hood

I am building Qt 5.9.0 under Windows with OpenSSL.

I have been building previous versions using OpenSSL 1.0.1h (the "heartbleed" 
patch). I am using this configurationwith Qt 5.9.0:


   Configure: configure -opensource -confirm-license -prefix
   Q:\Qt\5.9.0\64_dll -mp -release -nomake examples -no-qml-debug
   -no-compile-examples -nomake tests -openssl-linked -I
   Q:\Qt\openssl_64_dll\include -L Q:\Qt\openssl_64_dll\lib -opengl desktop
   OpenSSL path: Q:\Qt\openssl_64_dll (v1.0.1h) (linked)

and it builds without complaint, showing OpenSSL support in the diagnostic 
output:

   [...]
   OpenSSL  yes
   Qt directly linked to OpenSSL  yes
   [...]

However, when I try to build Qt 5.9.0 using OpenSSL 1.1.0f (current release) 
with this configuration:


   Configure: configure -opensource -confirm-license -prefix
   Q:\Qt\5.9.0\64_dll -mp -release -nomake examples -no-qml-debug
   -no-compile-examples -nomake tests -openssl-linked -I
   Q:\Qt\openssl_64_dll_110f\include -L Q:\Qt\openssl_64_dll_110f\lib -opengl
   desktop
   OpenSSL path: Q:\Qt\openssl_64_dll_110f (v1.1.0f) (linked)

it errors out with:

   ERROR: Feature 'openssl-linked' was enabled, but the pre-condition
   '!features.securetransport && libs.openssl' failed.

Any suggestions as to a cause on this?  The SSL library names were changed for 
Windows starting with v1.1.0 (e.g., "libeay32.lib" is now "libcrypto.lib"), 
and I'm wondering if that might be the problem here.  Is the Qt 5.9.x build 
system aware of this name change?  If not, can I correct this somehow on the 
configure line?



___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Licensing PITA

2017-05-05 Thread Bob Hood

On 5/5/2017 12:03 AM, Rainer Wiesenfarth wrote:
2017-05-04 20:02 GMT+02:00 Bob Hood <bho...@comcast.net 
<mailto:bho...@comcast.net>>:


I am trying to create a commercial, static build of 5.7.1


​I ran into a similar problem with building a commercial Qt 5.6.x ​from the 
Git repo. This does not work out-of-the-box as the Git source seems to be 
targeted on the GPL'ed users only.


AFAIK you have to remove some files and add some others (from a commercial 
source package) to be able to build a commercial version.


Really?  o.O

I might retrieve more detailed information on the process, but I am not sure 
if I am allowed (by the Qt people) to share it - given the fact that there 
seems to be no official howto by them...


Feel free to share it privately, then, if that would make you more 
comfortable.  I get the feeling there aren't enough of us doing their own Qt 
builds on this list to be interested.


___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Licensing PITA

2017-05-05 Thread Bob Hood

On 5/5/2017 4:11 AM, André Somers wrote:

This sounds like exactly the kind of issue you'd contact your commercial
support for?



You're probably right, André.  Licensed users who build Qt for themselves 
appear to hold "mythical creature" status.


:)

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] Licensing PITA

2017-05-04 Thread Bob Hood
I have a legitimate Qt license (just renewed, in fact).  I am trying to create 
a commercial, static build of 5.7.1, and the build output keeps coming up with:


Licensee
License ID..
Product license.Preview Edition
Expiry Date.

I have the license contents in the %USERPROFILE% folder under the name 
".qt-license", as all the documents indicate, but it either will not see it, 
or it is not happy with the contents (copied verbatim from the account).


Is there some kind of "debug" option I can provide that will tell me why it's 
blinded to my license?


___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Scaling QTextDocument into a drawing region

2017-02-18 Thread Bob Hood
I guess scaling the font is the best approach for this niche problem.  I've 
decided an intelligent application of both font scaling and text eliding will 
solve the issueuntil something better comes along.



On 2/17/2017 11:13 AM, Bob Hood wrote:
I want to wrangle HTML-formatted text contained in a QTextDocument into a 
specific drawing region, but I want it drawn there scaled-to-fit instead of 
broken-to-fit.  I'm not gettingthat, and I'm scratching my head.


Some code for discussion:

...
QTextDocument td;
td.setDocumentMargin(0);
td.setPageSize(QSize(bounds.width(), bounds.height()));
td.setTextWidth(bounds.width());
td.setHtml(tr("This is just a long line of text I want to 
display"));


painter.save();
painter.translate(bounds.left(), bounds.top());

QAbstractTextDocumentLayout::PaintContext ctx;
ctx.palette.setColor(QPalette::Text, painter.pen().color());
td.documentLayout()->draw(, ctx);

painter.restore();
...

Now, if the width of "bounds" is smaller than the document's layout, it of 
course breaks the line to make it fit. However, what I want it to do is 
/scale/the text to fit the width of "bounds" so that it all appears on a 
single line without breakage.


I've tried a number of different approaches to get the QTextDocument to 
actually scale to "bounds" if it exceeds it, including inserting "", 
which just causes breakage in non-obvious locations, and using the QPainter 
to try scaling the drawing area, but that gives me ugly text, even with 
small scaling factors.


The one I've seemed to have the most success with is:

...
QFont f = td.defaultFont();
for(;;)
{
doc_size = td.documentLayout()->documentSize();
if(doc_size.width() < new_bounds.width())
break;

f.setPointSizeF(f.pointSizeF() - .1);
td.setDefaultFont(f);
}
...

But of course the font size can only go so low before setPointSizeF() starts 
failing, so I have to lock the lowest font size, even if it doesn't result 
in the text fitting within "bounds".


Is this approach of manipulating the font size the best way of getting a 
QTextDocument to scale within an arbitrary boundary, or is there something 
else I might try manipulating (QAbstractTextDocumentLayout?) to get me 
closer to my goal?




___ Interest mailing list 
Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest


___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] QTest + QSignalSpy doesn't seem to work with deferred signals

2017-01-19 Thread Bob Hood

On 1/19/2017 2:29 AM, Viktor Engelmann wrote:


QSignalSpy::wait has a race condition though. When the signal is emitted 
from a different thread, it might come before you called .wait and then the 
wait will time out and return false (so it looks like the signal wasn't 
emitted). You can store the value of spy.size() and after the wait compare 
it to the current spy.size(). That is more robust, but when the signal is 
emitted before you start the .wait, the .wait will still wait for the full 
timeout time.


QTRY_COMPARE terminates as soon as the condition is met, so 
QTRY_COMPARE(spy.size(), 1) is better, but it uses a timeout of only 5 
seconds, which should be enough in most cases, but I have seen cases where a 
signal came 11 seconds after I caused it to be emitted (due to network 
and/or system load). I used QTRY_COMPARE_WITH_TIMEOUT instead to set a 
higher timeout.




Thanks for the info, Viktor.  :)

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Doubt extending my app functions ability

2017-01-19 Thread Bob Hood

On 1/12/2017 6:23 AM, Ernesto wrote:


Hello to everyone,

My name is Ernesto. I am a beginner in Qt programming and I have an 
specifics problems whit my first big project (desktop app). Let me explain 
myself:


I have to include plugins or add-ons to my application for new file format 
types




Ernesto, I don't know if you finally solved your issues, but I've just posted 
the project I have been working on which uses Qt plug-ins in the ways I 
previously described:


http://github.com/b0bh00d/Newsroom

This should give you a good example of a working Qt application that uses 
plug-ins to extend its functionality.Sorry I wasn't able to reference it earlier.


___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] QTest + QSignalSpy doesn't seem to work with deferred signals

2017-01-18 Thread Bob Hood

On 1/18/2017 10:52 AM, Giuseppe D'Angelo wrote:

Il 18/01/2017 18:16, Bob Hood ha scritto:

Is QTest capable of testing deferred results--i.e., evaluating tests results
after the even loop has run again--or can only synchronous actions be tested?
I know people have used qWait() and such in the past, or I supposed I could
manually invoke the event loop within the unit test until signals are emitted,
but I was wondering if QTest has been designed to handle that in a canonical
fashion I'm not immediately seeing.

Just use QTRY_COMPARE instead of QCOMPARE.


Oh, I wasn't aware of that macro.  I'll give that a go.

Mille grazie, Giuseppe.  :)

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] QTest + QSignalSpy doesn't seem to work with deferred signals

2017-01-18 Thread Bob Hood

On 1/18/2017 10:28 AM, Konrad Rosenbaum wrote:

Hi,

On Wednesday, January 18, 2017 10:16:30 Bob Hood wrote:

I'm trying to develop a unit test for an deferred signal; i.e. one that
won't be emitted until the event loop has been allowed to run.  The case
looks like:

void MyTest::user_info_deferred()
{
QVERIFY(qnam_class_ptr != nullptr);

QSignalSpy spy(qnam_class_ptr, ::signal_userInfoReceived);

// Retrieve account user information (deferred)
QCOMPARE(qname_class_ptr->userInfo(), true);

I think you need to insert a spy.wait(...) here. Give the event loop a chance
to run...


Ah, I see.  The qWait() approach has probably been folded into QSignalSpy.  
That makes sense.


Thanks, Konrad.

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] QTest + QSignalSpy doesn't seem to work with deferred signals

2017-01-18 Thread Bob Hood
I'm trying to develop a unit test for an deferred signal; i.e. one that won't 
be emitted until the event loop has been allowed to run.  The case looks like:


  void MyTest::user_info_deferred()
  {
  QVERIFY(qnam_class_ptr != nullptr);

  QSignalSpy spy(qnam_class_ptr, ::signal_userInfoReceived);

  // Retrieve account user information (deferred)
  QCOMPARE(qname_class_ptr->userInfo(), true);

  QCOMPARE(spy.count(), 1);   // make sure the signal was emitted exactly 
one time

QNAMClassUser info = qvariant_cast(spy.at(0).at(0));
  }

I have registered the QNAMClassUser data type, both in the header:

  Q_DECLARE_METATYPE(QNAMClassUser)

and in the MyTest::initTestCase() method:

  qRegisterMetaType();

Everything compiles, and the call to userInfo() that initiates the QNAM 
request returns true.  However, not surprisingly, the signal has not yet been 
emitted by the time I hit the next statement that tests the result.  (This is 
taken directly from the QSignalSpy example in the documentation, btw).


Is QTest capable of testing deferred results--i.e., evaluating tests results 
after the even loop has run again--or can only synchronous actions be tested?  
I know people have used qWait() and such in the past, or I supposed I could 
manually invoke the event loop within the unit test until signals are emitted, 
but I was wondering if QTest has been designed to handle that in a canonical 
fashion I'm not immediately seeing.

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Finally about extends my app function ability

2017-01-16 Thread Bob Hood

On 1/15/2017 7:09 PM, Ernesto wrote:


I can´t found an explanation of the differences of /reinterpret_cast/ and 
/dynamic_cast/, because I can´t found information about /reinterpret_cast/ 
in Qt Documentation (5.5.0 Qt version).




These are purely C++ mechanisms, and have nothing to do directly with Qt.

E.g.: https://www.tutorialspoint.com/cplusplus/cpp_casting_operators.htm
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Doubt extending my app functions ability

2017-01-13 Thread Bob Hood

On 1/12/2017 4:33 PM, Ernesto wrote:


Hello again, first, thanks to Bob Hood for his quickly reply.

I understood your explanation about my second problem, but I have another 
issue writing your solution in an example project. I have a MainApp (QT 
Widgets project) and a Lib1 (C++ Static Library project) and here is the code:




If you are creating statically linked plug-ins, that requires a different 
approach.  However, you also mention "the Lib1.dll file" elsewhere, so I 
assume you are not.


I'm sure you have read the online docs about Qt plug-in, Ernesto, but probably 
missed a subtle point which is evident in your interface file:



//This is header file of my interface, is included by both projects

classPInterface:publicQObject

{

Q_OBJECT

public:

explicitPInterface(QObject*parent=0);

virtualQString/Name/()const=0;

signals:

publicslots:

};



You have to designate/declare the class that will be the plug-in interface.  
Try adding the following declarations to your interface file "PInterface", so 
it looks something like this:


class PInterface : public QObject
{
Q_OBJECT
public:
explicit PInterface(QObject *parent = 0);
virtual QString Name() const = 0;

signals:
public slots:
};

*QT_BEGIN_NAMESPACE**
**Q_DECLARE_INTERFACE(PInterface , "org.Ernesto.PInterface")**
**QT_END_NAMESPACE*

And try again.

Also, a couple of observations:

1. Add a virtual destructor to your interface class so destructors of
   subclasses are properly called.
2. If you'll notice my original code example, I use QPluginLoader to load a
   factory instance.  The Qt plug-in system (QPluginLoader) *does not do
   multiple instancing of plug-ins*.  Therefore, if you will need multiple
   copies of any given plug-in you load, you'll need to use the Factory
   Pattern within each plug-in shared library to generate and return
   instances, and then designate the Factory class interface as the Qt
   plug-in interface instead; e.g.:

class PInterfaceFactory : public QObject
{
Q_OBJECT
public:
virtual PInterface* newInstance() = 0;
};

QT_BEGIN_NAMESPACE
Q_DECLARE_INTERFACE(PInterfaceFactory, "org.Ernesto.PInterfaceFactory")
QT_END_NAMESPACE

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Doubt extending my app functions ability

2017-01-12 Thread Bob Hood

On 1/12/2017 6:23 AM, Ernesto wrote:


Hello to everyone,

My name is Ernesto. I am a beginner in Qt programming and I have an 
specifics problems whit my first big project (desktop app). Let me explain 
myself:


I have to include plugins or add-ons to my application for new file format 
types; I looked around QPluginLoader class, Dynamic and Static libraries 
classes to achieve this goal, and here is my problem, in each one of this I 
have to include the header file and the library (or plugins) in my project. 
I have to develop other mini app to create those plugins or libraries. So 
here is _my first problem_, I don´t know how many plugins or libraries will 
be development to include in my app.




Hello, Ernesto.

I will not address your entire problem (because I'm not clearly understanding 
the second one), but your first is easy enough to answer.  The answer is:  You 
don't /need/do know how many plug-ins will be in development.


Plug-ins, by definition, are external code to your main application.  You 
application needs to /discover/those pieces of external code when it runs.  
This way, any number of plug-ins can be included with your application--or 
even added later by the user to an existing installation of your 
application--without having to modify any of your main application's code.


For example, when your main application starts, it looks in a location--either 
hard-coded, or defined by the user--and discovers all the available shared 
libraries:


...
QDir plugins("ernestos_plugins");
QStringList plugins_list = plugins.entryList(QStringList() << "*.dll" << 
"*.so", QDir::Files);

...

With each shared library it finds, it tests each to see if it is a plug-in 
designed for your application by coercing it to the interface contract, 
something like:


foreach(const QString& filename, plugins_list)
{
QString plugin_path = 
QDir::toNativeSeparators(QString("%1/%2").arg(plugins.absolutePath()).arg(filename));

QPluginLoader(plugin_path);
QObject* instance = plugin.instance();
if(instance)
{
IErnestoPlugin* iernestofactory = 
reinterpret_cast(instance);

if(iernestofactory)
{
...

Each one that supports the contract of your interface ("IErnestoPlugin") can 
be safely used within your application as a plug-in designed for your main 
application.


I hope I understood the first problem correctly.  Apologies if I didn't.
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Which "Widget" technology to use when starting a new desktop app

2017-01-05 Thread Bob Hood

On 1/5/2017 8:51 AM, william.croc...@analog.com wrote:

On 01/05/2017 10:29 AM, Bob Hood wrote:

On 1/5/2017 8:03 AM, Jason H wrote:

The mantra is to use QML.


I just wrote a wonderful utility using Qt 5.6.2 and Widgets for the 
desktop, and
there's no hint of QML in it.  It functions beautifully, is easily 
maintainable,

and even has full animations.

I don't think the mantra is QML.  The mantra is: Look at your need, your goal,
and choose the Qt technology that best fits it. If that's QML, fine. If that's
Widgets, fine.  Unless Qt reps step up here and support your statement (which
will have ramifications for me and, I'm sure, many others), summarily 
stating to
somebody that they should use QML as the primary tech for a new desktop app 
is,


I think, dogmatic, at best, and continues to fuel the anxiety that Qt is 
pouring

all the love into a QML/mobile focus.


... you mean, it isn't ?



Certainly, it would seem to be the case, but if that's also an official 
position, then I'd appreciate a representative of Qt stepping up and saying so 
publicly.  I would have decisions to make concerning my project's commercial 
license, and my product's future direction, based upon it.


___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Which "Widget" technology to use when starting a new desktop app

2017-01-05 Thread Bob Hood

On 1/5/2017 8:03 AM, Jason H wrote:

The mantra is to use QML.


I just wrote a wonderful utility using Qt 5.6.2 and Widgets for the desktop, 
and there's no hint of QML in it.  It functions beautifully, is easily 
maintainable, and even has full animations.


I don't think the mantra is QML.  The mantra is: Look at your need, your goal, 
and choose the Qt technology that best fits it. If that's QML, fine. If that's 
Widgets, fine.  Unless Qt reps step up here and support your statement (which 
will have ramifications for me and, I'm sure, many others), summarily stating 
to somebody that they should use QML as the primary tech for a new desktop app 
is, I think, dogmatic, at best, and continues to fuel the anxiety that Qt is 
pouring all the love into a QML/mobile focus.


Just my $0.02.
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] QtDesigner needs redesign.

2017-01-03 Thread Bob Hood

On 1/3/2017 10:26 AM, André Pönitz wrote:

My *personal* approach is to use Desiner only to play around to get
layout and resizing behaviour right, but re-do the actual implementation
in code, either from scratch or based on uic output.


Indeed, this is precisely how I use it in my workflow as well with QtCreator.  
Strictly layout of widgets, and then do signal/slot connections and dependency 
logic in the C++ code.


Works wonderfully.

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Progressive decay of QNAM/QNetworkReply

2016-12-21 Thread Bob Hood

On 12/21/2016 7:34 PM, Thiago Macieira wrote:

Em quarta-feira, 21 de dezembro de 2016, às 18:51:41 BRST, Bob Hood escreveu:

The URL is a REST API, and uses HTTPS.

Do you have the OpenSSL libraries installed, if you're on Linux or Windows?


I feel like an idiot.  All three versions of Qt are hand-built by me with 
OpenSSL support, and the OpenSSL (1.0.1h) shared libraries are automatically 
bundled into the bin/ folder with all the Qt shared libraries for distribution 
directly to developers and build slaves.  However, for some reason, they 
weren't with my builds of 5.6.2 and 5.7.1.  Something appears to have broken 
with my build pipeline.  If I drop them directly in, everything works.


Sorry to bother.  (facepalm)
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] Progressive decay of QNAM/QNetworkReply

2016-12-21 Thread Bob Hood
I have several projects that use QNAM/QNetworkReply pretty heavily. They were 
developed using Qt 5.4.2, and the networking works flawlessly.


However, I switched to Qt 5.6.2 and my networking stopped working.  No errors, 
my slots weren't even being invoked.  The request just appears to vanish into 
the ether.


I just tried Qt 5.7.1 and the same networking code is now returning 
|ProtocolUnknownError (|error code 301).


The code being used for all three versions is very simply:

...
QUrl url(url_str);
url.setUserName(username);
url.setPassword(password);

QNetworkRequest request(url);
request.setRawHeader(QByteArray("Content-type"), 
QByteArray("application/json"));

request.setRawHeader(QByteArray("Accept"), QByteArray("application/json"));

QNetworkReply* reply = QNAM->get(request);
connect(reply, ::readyRead, this, ::slot_get_read);
connect(reply, ::finished, this, 
::slot_get_complete);
connected = connect(reply, static_cast(QNetworkReply::*)(QNetworkReply::NetworkError)>(::error),

this, ::slot_get_failed);
...

This same code using the same URL works in 5.4.2, and variously doesn't in 
later versions.


The URL is a REST API, and uses HTTPS.

Any hints about what might be going wrong here?  Something new in 5.6 that I'm 
not doing?
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Odd behavior with QTcpSocket::waitForReadyRead()

2016-12-19 Thread Bob Hood
I'm refactoring the old code (modeled on Stevens' "UNIX Network Programming") 
to use the more modern Qt paradigm of signals/slots for async communications.  
So, the need for using waitforReadyRead() is obviated.


I'm guessing the timeout period being used greatly exceeds the underlying 
stack's more "reasonable" timeout values, but it still seems odd that it would 
not wait even fractions of a second for communications to complete.


Anyway, side-stepping the problem...

On 12/19/2016 4:38 PM, Bob Hood wrote:
I'm porting a TCP/IP client from wxWdigets to Qt. I've tried this under both 
5.4.2 and 5.6.2.


I have a user-configured timeout value for network reads.  The default is 
300 seconds (5 minutes).  I am feeding that to 
QTcpSocket::waitForReadyRead(), and it's basically ignoring--worse, it's 
generating an error.  It doesn't seem to matter if it's 300,000 msecs or 
3,000,000 msecs, I get "Network operation timed out" (5) returned from it.


int msecs = timeout * 100;
if(!socket.waitForReadyRead(msecs))
{
QString msg = QString(tr("An error occurred while receiving data 
from the server: \"%1\" (%2).")).arg(socket.errorString()).arg(socket.error());

...

This causes the communications to fail, even though the action takes place 
pretty much instantly, because I'm running the server on the same machine 
for testing/debugging.  If I tell QTcpSocket::waitForReadyRead() to wait 
forever:


if(!socket.waitForReadyRead(-1))

everything runs smoothly.

I've done nothing with the QTcpSocket instance in terms of configuration.  I 
just create it, and then start the ball rolling with a call to 
connectToHost().  Have I not configured some Qt5-thing correctly?


___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] Odd behavior with QTcpSocket::waitForReadyRead()

2016-12-19 Thread Bob Hood
I'm porting a TCP/IP client from wxWdigets to Qt.  I've tried this under both 
5.4.2 and 5.6.2.


I have a user-configured timeout value for network reads.  The default is 300 
seconds (5 minutes).  I am feeding that to QTcpSocket::waitForReadyRead(), and 
it's basically ignoring--worse, it's generating an error.  It doesn't seem to 
matter if it's 300,000 msecs or 3,000,000 msecs, I get "Network operation 
timed out" (5) returned from it.


int msecs = timeout * 100;
if(!socket.waitForReadyRead(msecs))
{
QString msg = QString(tr("An error occurred while receiving data 
from the server: \"%1\" (%2).")).arg(socket.errorString()).arg(socket.error());

...

This causes the communications to fail, even though the action takes place 
pretty much instantly, because I'm running the server on the same machine for 
testing/debugging.  If I tell QTcpSocket::waitForReadyRead() to wait forever:


if(!socket.waitForReadyRead(-1))

everything runs smoothly.

I've done nothing with the QTcpSocket instance in terms of configuration.  I 
just create it, and then start the ball rolling with a call to 
connectToHost().  Have I not configured some Qt5-thing correctly?

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Gluing windows to the bottom [SOLVED]

2016-12-08 Thread Bob Hood
I went ahead and tackled it this morning.  As I suspected, it required a 
nativeEvent() handler to achieve my desired effect.  In the interests of 
posterity, here's the Windows code that works for my context. It "glues" a 
window directly onto the desktop, and keeps it from changing its Z-order when 
the user tries to click on it with the mouse:


bool Headline::nativeEvent(const QByteArray , void *message, long 
*result)

{
*result = 0L;

if(glue_to_desktop)
{
if(!QString(eventType).compare("windows_generic_MSG"))
{
MSG* msg = (MSG*)message;

if(msg->message == WM_WINDOWPOSCHANGING)
{
RECTr;
HWNDbottom = nullptr;

// assume the first window consuming the entire virtual
// desktopsize IS the desktop (e.g., "Program Manager"),
// andglue ourselves right on top of it
int desktop_width = GetSystemMetrics(SM_CXVIRTUALSCREEN);
int desktop_height = GetSystemMetrics(SM_CYVIRTUALSCREEN);

HWND w = GetTopWindow(NULL);
while(w)
{
GetWindowRect(w, );
if((r.right - r.left) == desktop_width && (r.bottom - 
r.top) == desktop_height)

break;
if(IsWindowVisible(w))
bottom = w;
w = GetNextWindow(w, GW_HWNDNEXT);
}

auto pwpos = (WINDOWPOS*)msg->lParam;
pwpos->hwndInsertAfter = bottom;
pwpos->flags &= (~SWP_NOZORDER);
// fall through to the return
}
}
    }

return false;
}



On 12/5/2016 10:44 AM, Bob Hood wrote:

Ok, here's another one for the brain trust...

I'm creating windows in a tasktray application (Windows 7 64-bit).  These 
"child" windows inherit from QWidget and are not parented, but they are 
being created by the main application.


I can "glue" them to the screen (i.e., top of Z order) using the 
Qt::WindowStaysOnTopHint flag, and that works perfectly.  However, I want to 
"glue" them to the desktop instead (i.e., bottom of Z order), and using 
Qt::WindowStaysOnBottomHint doesn't appear to accomplish that with the same 
persistence as Qt::WindowStaysOnTopHint, at least under Windows.


I understand this may require a platform-specific solution, and I can accept 
that since this tool will probably only be used under Windows.  I even tried 
using SetWindowPos() directly after opening the window:


void Headline::showEvent(QShowEvent *event)
{
QWidget::showEvent(event);
SetWindowPos((HWND)winId(), HWND_BOTTOM, 0, 0, 0, 0, 
SWP_NOACTIVATE|SWP_NOMOVE|SWP_NOSIZE);

}

But that doesn't seem to maintain the order.  I'm also using 
Qt::WA_ShowWithoutActivating, and that seems to work, but once I move the 
window (using QPropertyAnimation, for example), activation and Z-order 
shifting become an issue.  I guess my question becomes: Is there a way to 
force a window to the background behind all other windows, and /keep/it 
there even if it is being interacted with--programmatically or, for example, 
by the user clicking on it?  Something tells me that intercepting and 
ignoring events might do it, but I'm not sure if that's the right approach.



___ Interest mailing list 
Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest


___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] Gluing windows to the bottom

2016-12-05 Thread Bob Hood

Ok, here's another one for the brain trust...

I'm creating windows in a tasktray application (Windows 7 64-bit).  These 
"child" windows inherit from QWidget and are not parented, but they are being 
created by the main application.


I can "glue" them to the screen (i.e., top of Z order) using the 
Qt::WindowStaysOnTopHint flag, and that works perfectly.  However, I want to 
"glue" them to the desktop instead (i.e., bottom of Z order), and using 
Qt::WindowStaysOnBottomHint doesn't appear to accomplish that with the same 
persistence as Qt::WindowStaysOnTopHint, at least under Windows.


I understand this may require a platform-specific solution, and I can accept 
that since this tool will probably only be used under Windows.  I even tried 
using SetWindowPos() directly after opening the window:


void Headline::showEvent(QShowEvent *event)
{
QWidget::showEvent(event);
SetWindowPos((HWND)winId(), HWND_BOTTOM, 0, 0, 0, 0, 
SWP_NOACTIVATE|SWP_NOMOVE|SWP_NOSIZE);

}

But that doesn't seem to maintain the order.  I'm also using 
Qt::WA_ShowWithoutActivating, and that seems to work, but once I move the 
window (using QPropertyAnimation, for example), activation and Z-order 
shifting become an issue.I guess my question becomes: Is there a way to force 
a window to the background behind all other windows, and /keep/it there even 
if it is being interacted with--programmatically or, for example, by the user 
clicking on it?  Something tells me that intercepting and ignoring events 
might do it, but I'm not sure if that's the right approach.
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] C++11 enum class and QSettings

2016-12-05 Thread Bob Hood

On 12/5/2016 12:48 AM, Michael Sué wrote:

Hi,

with a enum class you'll need to give the type explicitly, as there is no 
auto-conversion to int:

  settings.setValue("report.stacking", 
QVariant::fromValue(report_stacking));

The same with QVariant::value: var.value();


Thanks, Michael (and everybody else who answered).  Your solution worked 
perfectly with the least amount of changes.

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] C++11 enum class and QSettings

2016-12-04 Thread Bob Hood

I'm trying to save a C++11 enum class value in a QSettings.  In a header I have:

#include 

enum class ReportStacking
{
Stacked,
Intermixed
};
Q_DECLARE_METATYPE(ReportStacking)

And then in the module, using a data member of this type:

ReportStacking report_stacking = ReportStacking::Intermixed;

I've tried both:

QVariant var;
var.setValue(report_stacking);
settings.setValue("report.stacking", var);

and:

settings.setValue("report.stacking", QVariant::fromValue(report_stacking));

and I'm getting a run-time error:

QVariant::save: unable to save type 'ReportStacking' (type id: 1027).

ASSERT failure in QVariant::save: "Invalid type to save", file 
kernel\qvariant.cpp, line 2144

Debug Error!

Program: Q:\Qt\5.6.2\64_dll\bin\Qt5Cored.dll
Module: 5.6.2
File: global\qglobal.cpp
Line: 3026

ASSERT failure in QVariant::save: "Invalid type to save", file 
kernel\qvariant.cpp, line 2144


Is there a Qt-base way of storing C++11 enum class types, or do I have to do 
some manual coding to map a ReportStacking class value to an int for QSettings 
to digest?

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Qt containers deprecated with 5.0?

2016-11-29 Thread Bob Hood

On 11/28/2016 11:43 PM, Burak Arslan wrote:

On 11/28/16 12:54, André Somers wrote:

there is nothing wrong with using std containers in a Qt application,

Aren't qt-branded containers emit-friendly? AFAIK the meaty bits are
refcounted which makes it a non-issue to pass them around from signals
to slots (even across thread boundaries). How should one use std
containers in such cases? wrap everything with a std::shared_ptr  ?


I believe that was the salient point that Thiago made earlier in this thread:


On 11/27/2016 12:58 PM, Thiago Macieira wrote:

...
The containers, however, are quite different. The two most important
differences are:
  *1) implicit sharing*
  2) better naming of functions

[#2: obviously, in our opinion]


___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Qt containers deprecated with 5.0?

2016-11-27 Thread Bob Hood

On 11/27/2016 12:58 PM, Thiago Macieira wrote:

On domingo, 27 de novembro de 2016 10:32:23 PST Bob Hood wrote:

"Historically, Qt used to provide functions which were direct equivalents of
many STL algorithmic functions. Starting with Qt 5.0, you are instead
encouraged to use directly the implementations available in the STL; most
of the Qt ones have been deprecated (although they are still available to
keep the old code compiling)."

The algorithms were deprecated because there aren't two ways of implementing a
binary search. So the Qt implementations were direct duplication, no way
around them.

The only thing that changed is that the Qt functions had a couple of
convenience overloads that operated on the entire container, as opposed to an
iterator pair. Many people found them, well, convenient.

The containers, however, are quite different. The two most important
differences are:
  1) implicit sharing
  2) better naming of functions

[#2: obviously, in our opinion]


Of course, and thanks for the clarification.  I wanted to make sure I had my 
team follow the recommended course of action with regard to this when we start 
any new Qt5-based development.


___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] Qt containers deprecated with 5.0?

2016-11-27 Thread Bob Hood
This is probably common knowledge, but I came across the following paragraph 
sited in a stackoverflow answer[1] from a page regarding Qt algorithms[2]:


"Historically, Qt used to provide functions which were direct equivalents of 
many STL algorithmic functions. Starting with Qt 5.0, you are instead 
encouraged to use directly the implementations available in the STL; most of 
the Qt ones have been deprecated (although they are still available to keep 
the old code compiling)."


The responder then summarizes:

"So using STL when programming with Qt 5 is officially encouraged, should it 
become a necessity."


The original poster was asking about tuples, but the responder sites Qt 
algorithms.  My question is:  Were Qt containers also deprecated along with Qt 
algorithms starting with Qt 5.0?  Or put another way, should new code based on 
the Qt5 series avoid using Qt-specific containers now?



[1] 
https://stackoverflow.com/questions/35525588/is-there-a-qpair-class-but-for-three-items-instead-of-two

[2] https://doc.qt.io/qt-5/qtalgorithms.html#qt-and-the-stl-algorithms
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] QFutureWatcher not emitting signals

2016-11-23 Thread Bob Hood
Nevermind.  It's a problem at the macro level.  This will only work when the 
Tasklet class is created from the main thread.  I was creating it from deep 
down inside calls originating from a QThread object, which is apparently a no-no.


I'll refactor to notify the main thread to create these instances, and all 
should be well.


Sorry to bother.


On 11/23/2016 8:16 PM, Bob Hood wrote:
I did some Googling about this, and found a LOT of hits about QFutureWatcher 
not emitting its signals (like finished()) when the QFuture it's watching 
completes.  However, in all cases I've seen, people were using an auto 
version of QFutureWatcher which dropped out of scope on them (i.e., 
allocated on the local stack). Allocating it on the heap seemed to solve all 
problems I found.


Well, it isn't solving it for me.  I'm using Qt 5.6.2.  I have a simple 
tasklet class that performs a discrete function in a separate thread 
independent of the main process.  Its basic structure looks like this:


Definition:

class Tasklet : public QObject
{
Q_OBJECT
public:
Tasklet(...args...);
~Tasklet();

signals:
voidsignal_result(const QString& reference, bool result);

private slots:
voidslot_future_finished();

private:// methods
boolrun();

private:// data members
...args...

QFutureWatcher*   watcher;
};

Implementation:

Tasklet::Tasklet(...args...) : ...init...
{
QFuture future = QtConcurrent::run(this, ::run);
watcher = new QFutureWatcher();
connect(watcher, ::finished, this, 
::slot_future_finished);

watcher->setFuture(future);
}

bool Tasklet::run()
{
...processing...
return true;
}

void Tasklet::slot_future_finished()
{
emit signal_result(reference, watcher->result());
watcher->deleteLater();
}

Tasklet::slot_future_finished() is NEVER called. I've verified that the 
connect() returns true, tried using the old-style syntax for connect, and 
I've also tried having a class member for QFutureWatcher instead of 
allocating it on the heap. No joy.


Can another pair of eyes see what am I doing wrong here?
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest



___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] QFutureWatcher not emitting signals

2016-11-23 Thread Bob Hood
I did some Googling about this, and found a LOT of hits about QFutureWatcher 
not emitting its signals (like finished()) when the QFuture it's watching 
completes.  However, in all cases I've seen, people were using an auto version 
of QFutureWatcher which dropped out of scope on them (i.e., allocated on the 
local stack). Allocating it on the heap seemed to solve all problems I found.


Well, it isn't solving it for me.  I'm using Qt 5.6.2.  I have a simple 
tasklet class that performs a discrete function in a separate thread 
independent of the main process.  Its basic structure looks like this:


Definition:

class Tasklet : public QObject
{
Q_OBJECT
public:
Tasklet(...args...);
~Tasklet();

signals:
voidsignal_result(const QString& reference, bool result);

private slots:
voidslot_future_finished();

private:// methods
boolrun();

private:// data members
...args...

QFutureWatcher*   watcher;
};

Implementation:

Tasklet::Tasklet(...args...) : ...init...
{
QFuture future = QtConcurrent::run(this, ::run);
watcher = new QFutureWatcher();
connect(watcher, ::finished, this, 
::slot_future_finished);

watcher->setFuture(future);
}

bool Tasklet::run()
{
...processing...
return true;
}

void Tasklet::slot_future_finished()
{
emit signal_result(reference, watcher->result());
watcher->deleteLater();
}

Tasklet::slot_future_finished() is NEVER called. I've verified that the 
connect() returns true, tried using the old-style syntax for connect, and I've 
also tried having a class member for QFutureWatcher instead of allocating it 
on the heap. No joy.


Can another pair of eyes see what am I doing wrong here?
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] TEMPLATE=lib creating executable config for Visual Studio project files

2016-11-12 Thread Bob Hood

On 11/12/2016 8:12 PM, Thiago Macieira wrote:

On sábado, 12 de novembro de 2016 19:14:37 PST Bob Hood wrote:

QMAKE isn't behaving the way I'm expecting.  I've tried 4.8.6, 5.4.2 and
5.6.2, and this bare-bones QMAKE .pro file keeps generating Visual Studio
project files (.vcproj and .vcxproj) that have an "Application"
configuration with an ".exe" extension when I run "qmake -t vcapp":

The problem is in your explanation above. Specifically in the "app" part of
"-t vcapp"

You asked qmake to change the TEMPLATE to "vcapp". So of course it created an
application. If you wanted a library, you should have used -t vclib.

Or, better yet, qmake -tp vc


Geez, I just knew I was being stupid.

Thanks, Thiago.

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] TEMPLATE=lib creating executable config for Visual Studio project files

2016-11-12 Thread Bob Hood
QMAKE isn't behaving the way I'm expecting.  I've tried 4.8.6, 5.4.2 and 
5.6.2, and this bare-bones QMAKE .pro file keeps generating Visual Studio 
project files (.vcproj and .vcxproj) that have an "Application" configuration 
with an ".exe" extension when I run "qmake -t vcapp":


TARGET = tmp
TEMPLATE = lib

QT -= gui

CONFIG += core
CONFIG -= widgets

Goes without saying that this should be a shared library (.dll) project.  
Since all three Qt versions are choking on this, seems apparent that I am 
missing some additional setting, but searches don't point to anything obvious.

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Qt and Dropbox API v2

2016-11-02 Thread Bob Hood

On 10/20/2016 5:29 PM, Bob Hood wrote:
Anybody know of a library, either C++- or (preferably) Qt-based, that 
implements an interface to Dropbox using its new APIv2?


I did it myself.

https://github.com/b0bh00d/QtDropbox2

In case anybody else has a need to access Dropbox via Qt using APIv2.
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Issue compiling qt 5.6.2

2016-10-28 Thread Bob Hood
I just built full 5.6.2 in both release and debug in the last 24 hours, and I 
had no errors at all building it.


This is under Windows using command line Visual Studio 2013 + jom w/ 24 threads.


On 10/28/2016 1:23 PM, Etienne Sandré-Chardonnal wrote:

Dear all,

I'm trying to switch from Qt 5.6.1 to 5.6.2, using the same exact command 
line to configure and compile.


configure works and properly detects system-png (I need to compile agains my 
own libpng)


but building ends very quickly on "ERROR : libpng development package not found"

The build works with 5.6.1 but not 5.6.2, and googling for this error gives 
no answer. Also, the error message is not very clear, I'm not sure which 
file is not found.


Thanks in advance!

Regards



___ Interest mailing list 
Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest


___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] Qt and Dropbox API v2

2016-10-20 Thread Bob Hood
Anybody know of a library, either C++- or (preferably) Qt-based, that 
implements an interface to Dropbox using its new APIv2? I'm trying to use the 
one by lycis[1], but it is implemented only for APIv1 and it's giving me some 
heartburn when I try to have my registered app use it for access.  
Additionally, it lacks some basic functionality--like adding or removing 
folders--and looks like it was abandoned nearly two years ago.


Google searches are pretty sparse, and then any hits only have APIv1 
implementations.


[1] https://github.com/lycis/QtDropbox

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] What don't you like about Qt?

2016-10-16 Thread Bob Hood

On 10/15/2016 6:59 PM, Roland Hughes wrote:

When you work off nothing but stories you are hacking on the fly...


Ok, since I've responded to this before (perhaps this should be a different 
thread?), I'll jump in there again and clarify where /I'm/ coming from...


First, let me say I embrace Agile, just as I embrace Waterfall, Spiral, and 
all other methodologies.  My issue with Agile is not with the methodology 
itself, but with the single-mindedness with which the industry has embraced it.


Agile is the spawn of Spiral--a.k.a., rapid prototyping--elevated to what can 
only be viewed as a religion now in the industry, so "hacking on the fly" is 
what Agile is all about: Short-term gains from short-term feedback.  In Spiral 
(which was /my/ methodology), you did the rapid prototyping and iterating with 
the customer to ensure that the program matched the formal requirements while 
you developed, instead of waiting until the end.  In Agile, you forego the 
formal requirements gathering step, so you only and always have the customer's 
fiat ("User Stories") driving the direction of the development.  It's hard to 
know when you're really done because you don't really have metrics to tell 
you--or the customer--when the project /is/ done.


In the 2005 book "The Art of Project Management", Scott Berkun observed:

   "For completeness, it is worth considering the simplest possible case:
   there is no project. All work is done on a piecemeal basis--requests come
   in, they are evaluated against other work, and then they are put into the
   next available slot on the schedule. Some development teams, web site
   developers, or IT programming departments work in much this way. Agile
   methods...are often recommended to these teams as the most natural system
   for organizing work because these methods stress flexibility, simplicity,
   and expectations of change."

This was just when Agile was gaining prominence, and before it had pretty much 
overtaken and eclipsed all other project management styles.  Agile fit the "IT 
programming project" style of development quite well ("flexibility, 
simplicity, and expectations of change"), but it did not scale well in all 
cases, and, as some of the anecdotal evidence shows, it can actually inflict 
damage on some project types.


There are people who believe Agile is the best method devised, and like bacon, 
should be employed lavishly and in all cases.  While I think it is 
single-minded, I understand where they are coming from.  I loved (and still do 
love) Spiral.  However, I am suspicious that those who beat their chests the 
most about how Agile is perfect for everything have only ever been in, or only 
seek out, those kind of "IT programming project" environments where it is a 
best fit.
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] What don't you like about Qt?

2016-10-04 Thread Bob Hood

On 10/4/2016 8:03 AM, Jason H wrote:

I think the bigger issue, that many people have expressed here, but not said as 
such, is the Qt release cycle is not Agile. As more teams adopt Agile 
development practices...


http://www.linkedin.com/pulse/agile-dead-matthew-kern

Like Spiral from whence it sprung, I think Agile works wonderfully in certain 
project profiles.  However, not everybody drinks the all-Agile-all-the-time 
Kool-Aid®.  Contrary to popular religion, Agile is not the savior of the 
industry. It's another tool in the toolbox, not a replacement for all the 
other tools, and savvy project managers still apply the development 
methodology (Spiral, Agile, Waterfall, etc.) or hybrid -- e.g., Waterfall 
mixed with Agile elements -- that makes the most sense for the success of a 
project.  Just applying full Agile without considering the characteristics of 
the project and its intended result is absolutely not a guarantee of success.


(No intention to hijack the thread.)
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] What don't you like about Qt?

2016-09-18 Thread Bob Hood

On 9/18/2016 2:43 AM, Jean-Michaël Celerier wrote:

Some things that bother me :

* Features being QML-only instead of being usable from C++. I like coding in 
C++ (but I agree it's hard).


This is certainly arguable.  For some, I guess coding in C++ is hard.  For 
others, it's as natural as breathing.


In fact, it leads to my particular issue: QML.  I waited a long time for Qt to 
reach a point where it was usable for mobile development, and I personally was 
disappointed with the declarative approach taken with QML.  Aside from being 
somewhat out of character for the framework, it seems to have been a divisive 
approach, creating a separation not only between interface and code, but 
between languages!  Jean-Michaël's point abovehighlights that.


I want to code mobile in a language I use on a daily basis for things other 
than just mobile.  I realize it is a great fit for some people, but 
unfortunately for me, QML isn't.  I've therefore had to turn my attention to 
Xamarin (especially now that it is integrated into Visual Studio).  I've never 
been much of a fan of C#, but it is certainly closer to C++ than QML.


(No QML flame wars, please.  I'm just expressing my personal situation, not 
saying that QML isn't useful for some people.)

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Is Qt/QML suitable for me?

2016-08-30 Thread Bob Hood

On 8/30/2016 1:11 PM, Артур Истомин wrote:

I want to convert my POS (point of sale) software (long ugly shell-scripts)
to GUI-software for mobile (Android) and desktop (Linux/Windows) devices.

I don't know C++ but know some JS. So is it possible to write my
application, POS, entirely on JavaScript? Almost all application logic are
sql transactions with local sqlite database.


Honestly, I think Qt is the best framework for C++ that I've seen in my entire 
career (spanning back to the early 1980s). However, if you don't already 
/know/C++, then you will have a substantially greater learning curve just to 
get to use Qt for the application you want to write.  As much as the standards 
committee is trying to turn C++ into a scripting language, it still has it's 
roots in C, and Here Be Monsters for the uninitiated.


I think it is a good thing to have at least some familiarity with a modern, 
native language like C++ or C# (which is arguably designed after Java), but in 
your particular case, only having had exposure to something more akin to a 
scripting language, I'd recommend you evaluate using Python with PySide (which 
is Python bindings for Qt) to port your point-of-sale software there.  That 
would not only put you into the more familiar (and more forgiving) territory 
of a rapid-development scripting language, you'd also get to learn Qt at the 
same time, and could later transition to C++ already having knowledge of how 
to leverage the Qt framework within it.


Just a recommendation.  :)
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] FLex / Bison and QT4 4.8.1 Win32 interaction

2016-07-07 Thread Bob Hood

On 7/7/2016 8:26 PM, william.croc...@analog.com wrote:

On 07/07/2016 08:01 PM, Fabio Giovagnini wrote:

Thanks Frank. So you suggest to build from the sources. I' try. Thanks again



I suggest you just take the weekend and write your own
parser and lexical analysis, void of Flex and Bison.
I did and I have never looked back.

:-)



And, whereas, I pretty much founded a career on them, so to each his own.  ;)

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Help with Qt 5.6.1-1 32-bit build errors

2016-07-07 Thread Bob Hood
Bingo!  That appears to have been the problem.  Just like the report, I too 
was using jom, and when I changed my expert-knowledge build script to force 
nmake for static builds, it breezed through the 32-bit static release build 
with no problems.  Why this wasn't encountered with 64-bit static I don't 
know, but it certainly appears to have been the exact problem preventing the 
32-bit static build from completing.


Thanks so much, Mike.  :)


On 7/7/2016 10:10 AM, Mike Chinander wrote:
Looks like it could be related to this bug report: 
https://bugreports.qt.io/browse/QTBUG-53393


Did you try re-running nmake/jom after you got this error?

On Thu, Jul 7, 2016 at 10:57 AM, Bob Hood <bho...@comcast.net 
<mailto:bho...@comcast.net>>wrote:


I'm trying to build Qt 5.6.1-1 32-bit licensed static using Visual
Studio 2013.  I am configuring with the following command:

configure -commercial -confirm-license -static -prefix
Q:\Qt\5.6.1\32_static -mp -release -nomake examples -no-qml-debug
-no-compile-examples -nomake tests -opengl desktop

I have successfully built 64-bit versions, static and DLL, licensed and
open source, with similar config commands just prior to attempting the
32-bit builds.  At some point in the 32-bit build, I'm getting:

LINK : fatal error LNK1181: cannot open input file
'D:\Qt\build\32_static\qtimageformats\plugins\imageformats\qwebp.lib'

I read that the webkit had been removed from the 5.6 distribution (I'm
using the source tarballs), but it looks like there's some kind of
dependency upon it anyway.  I configured the 64-bit builds with ICU, but
I did not with 32-bit because we don't want the webkit builds in the
32-bit static.  I tried adding the '-skip qtwebkit' command (which works
fine for prior Qt versions), but then I get the different build error:

Attempting to skip non-existent module qtwebkit.
Error: File Makefile doesn't exist.

Removing '-skip qtwebkit' from the config line leads me to the link
error with the image format plug-in.

Do I now need to provide ICU to the 32-bit builds even though we
/aren't/building the webkit module, or is there some new means of
disabling the webkit as part of that type of build?I'd appreciate any
insights here.


___
Interest mailing list
Interest@qt-project.org <mailto:Interest@qt-project.org>
http://lists.qt-project.org/mailman/listinfo/interest




___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] Help with Qt 5.6.1-1 32-bit build errors

2016-07-07 Thread Bob Hood
I'm trying to build Qt 5.6.1-1 32-bit licensed static using Visual Studio 
2013.  I am configuring with the following command:


   configure -commercial -confirm-license -static -prefix
   Q:\Qt\5.6.1\32_static -mp -release -nomake examples -no-qml-debug
   -no-compile-examples -nomake tests -opengl desktop

I have successfully built 64-bit versions, static and DLL, licensed and open 
source, with similar config commands just prior to attempting the 32-bit 
builds.  At some point in the 32-bit build, I'm getting:


   LINK : fatal error LNK1181: cannot open input file
   'D:\Qt\build\32_static\qtimageformats\plugins\imageformats\qwebp.lib'

I read that the webkit had been removed from the 5.6 distribution (I'm using 
the source tarballs), but it looks like there's some kind of dependency upon 
it anyway.  I configured the 64-bit builds with ICU, but I did not with 32-bit 
because we don't want the webkit builds in the 32-bit static.  I tried adding 
the '-skip qtwebkit' command (which works fine for prior Qt versions), but 
then I get the different build error:


   Attempting to skip non-existent module qtwebkit.
   Error: File Makefile doesn't exist.

Removing '-skip qtwebkit' from the config line leads me to the link error with 
the image format plug-in.


Do I now need to provide ICU to the 32-bit builds even though we /aren't/ 
building the webkit module, or is there some new means of disabling the webkit 
as part of that type of build?I'd appreciate any insights here.


___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] QUndoStack

2016-06-24 Thread Bob Hood

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 you, the QUndoStack design is really odd and the need to 
execute commands while pushing (in my view) makes it less flexible than it 
could be. I wonder if we will hear from anyone who likes this design?


It has been my experience that this is the typical design of an Undo system.  
You invoke redo() as you inject the undo action into the stack, effectively 
killing two birds with one stone.  You don't push an action onto the stack 
unless it has actually been applied.  If the Undo stack did not apply the 
action, there's no contract in place to guarantee that the action has been, or 
will be, applied in another context.  A subsequent undo() on an action that 
was never applied means you might (in the best case) corrupt the application's 
data.


It's an effective design, requiring less code, and guaranteeing a valid stack 
state.


Just my $0.02.
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] deploying translatations when cross-compiling

2016-05-08 Thread Bob Hood

On 5/8/2016 5:06 AM, Boudewijn Rempt wrote:

I'm building my project on Linux, using mxe, for Windows. When I package
everything up, I copy all the Qt translations into a "translations folder
in the folder where my application exe is, but the Qt transaltions aren't
used:


krita/bin/krita.exe
krita/bin/translations/qtbase_ja.qm
etc.

What else do I need to do to make sure Qt finds its own translations? I
don't have the windeployqt utiliy on Linux.



You could manually create a "qt.conf" file in the bin/ folder, and have it 
point at the translations folder, e.g.:


[Paths]
Prefix = .
Translations = translations

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Any known issues with rDNS lookups on OS X?

2016-04-11 Thread Bob Hood

On 4/11/2016 8:09 PM, Thiago Macieira wrote:

On segunda-feira, 11 de abril de 2016 19:11:37 PDT Bob Hood wrote:

I'm using Qt 5.4.2 code to retrieve a connected machine's hostname (via
QHostInfo::lookupHost()).  The code works perfectly under Windows, but fails
under OS X.  I get the hostname under Windows, but I'm left with only the
connections network address on OS X.

Does anybody know of any existing issues with reverse-DNS look-ups on OS X?

There are no known issues. Are you sure the machine in question has a reverse
entry in DNS?

Please show us the code you're using and the proof with the "host" command
that the resolution of that IP works.



Slot:

  void Service::slot_lookup_complete()
  {
  RDnsBind* rdns_bind = qobject_cast<RDnsBind*>(sender());
  QString domain_id = rdns_bind->cd->domain_id;
  QString key;

  if(rdns_bind->host_info.error() != QHostInfo::NoError)
  {
if(!rdns_bind->host_info.addresses().isEmpty())
  {
  QHostAddress address = rdns_bind->host_info.addresses().first();
  key = address.toString();

  RDnsData rdns_data;
  rdns_data.domain_ip = key;
  rdns_data.domain_hostname = key;
  rDNS_cache[domain_id] = rdns_data;
  }
  }
  else if(!rdns_bind->host_info.addresses().isEmpty())
  {
  QHostAddress address = rdns_bind->host_info.addresses().first();
  key = address.toString();

  RDnsData rdns_data;
  rdns_data.domain_ip = key;
  rdns_data.domain_hostname = rdns_bind->host_info.hostName();
  rDNS_cache[domain_id] = rdns_data;
  }

  ...

  rdns_bind->deleteLater();
  }

Invocation:

  ...
  RDnsBind* rdns_bind = new RDnsBind(this);
  rdns_bind->cd = cd;
  connect(rdns_bind, SIGNAL(signal_lookup_complete()), this, 
SLOT(slot_lookup_complete()));


  QHostInfo::lookupHost(IP, rdns_bind, SLOT(slot_lookup_complete(QHostInfo)));
  ...

"host" command:

Bobs-Mac:repo bob$ host 10.38.1.108
Host 108.1.38.10.in-addr.arpa. not found: 3(NXDOMAIN)
Bobs-Mac:repo bob$ host sikun
Host sikun not found: 3(NXDOMAIN)

So, obviously there is no host entry for a NAT'd machine on the local network 
segment.  However, Windows machines identify other Windows machines correctly 
using this functionality on the same network segment.  Perhaps it's the 
Windows NetBIOS layer that is making that possible between Microsoft operating 
systems.

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] Any known issues with rDNS lookups on OS X?

2016-04-11 Thread Bob Hood
I'm using Qt 5.4.2 code to retrieve a connected machine's hostname (via 
QHostInfo::lookupHost()).  The code works perfectly under Windows, but fails 
under OS X.  I get the hostname under Windows, but I'm left with only the 
connections network address on OS X.


Does anybody know of any existing issues with reverse-DNS look-ups on OS X?
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] CLion to replace QtCreator?

2016-04-03 Thread Bob Hood

On 4/3/2016 1:41 PM, Emre Besirik wrote:
On 03 Apr 2016, at 22:18, Bob Hood <bho...@comcast.net 
<mailto:bho...@comcast.net>> wrote:


On 4/3/2016 12:07 PM, Emre Besirik wrote:

Hello list,
I know its a little bit off-topic but I was wondering your ideas about the 
unpleasentness of coding with QtCreator (no offense, I respect the 
creators of the original IDE but..)
So there is this; https://youtrack.jetbrains.com/issue/CPP-318 (in case 
you didn’t know already) do you support it?

Do you also find it a littlebit unpleasent to code in QtCreator like me?


Actually, no I don't. Quite the contrary.  It has actually saved me when 
I've had to leave Visual Studio to work on OS X and Linux, because--with 
the right keyboard mapping--it is the closest cross-platform thing I've yet 
found to the "feel" of Visual Studio, where I spend most of my days.


So, I do not agree with you at all.  In may ways, I consider QtCreator to 
be my home-away-from-home.


Have you ever tried ANY jetbrains product? I do mean just for few days but 
really trying...


I have used PyCharm, but honestly, having a separate IDE just for Python is 
not practical since I can develop/debug Python right along side C/C++ in 
Visual Studio using an add-in.  If I needed to do so on a non-Windows 
platform, then I might not necessarily choose QtCreator.


I'm not saying the JetBrains wares are not good--quite the contrary--but since 
I'm a Qt developer, and I have used Visual Studio for decades, the choice of 
QtCreator for non-Windows platforms is a no-brainer.  And it's free, just like 
JetBrains' offerings (with the right license).


But be aware that you're talking to somebody who has written whole 
applications using nothing but vi and a command prompt.  I'm certainly not a 
/connoisseur/of IDEs.  ;)


___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] CLion to replace QtCreator?

2016-04-03 Thread Bob Hood

On 4/3/2016 12:07 PM, Emre Besirik wrote:

Hello list,
I know its a little bit off-topic but I was wondering your ideas about the 
unpleasentness of coding with QtCreator (no offense, I respect the creators 
of the original IDE but..)
So there is this; https://youtrack.jetbrains.com/issue/CPP-318 (in case you 
didn’t know already) do you support it?

Do you also find it a littlebit unpleasent to code in QtCreator like me?


Actually, no I don't.  Quite the contrary.  It has actually saved me when I've 
had to leave Visual Studio to work on OS X and Linux, because--with the right 
keyboard mapping--it is the closest cross-platform thing I've yet found to the 
"feel" of Visual Studio, where I spend most of my days.


So, I do not agree with you at all.  In may ways, I consider QtCreator to be 
my home-away-from-home.
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Are slots even needed these days?

2016-03-19 Thread Bob Hood

On 3/16/2016 3:37 PM, André Pönitz wrote:

On Wed, Mar 16, 2016 at 02:31:33PM +, Gian Maxera wrote:

I can connect to Foo::bar either way. If I don't intend to ever use
the old-style connect syntax, is there a reason to have "public
slots:" anymore?

One reason that for me it’s fundamental: Readability of your code !!!

It doesn't make the code more readable then a comment

// This is a slot !!!
void foo();


I would argument that it /does/when you have legions of people out there 
already conditioned to this:


   ...
   public slots:
   void  bar();
   void  foo();
   ...

instead of:

   ...
   // This is a slot!!!
   void foo();
   ...
   // Oh, hey, this is a slot too!!!
   void bar();
   ...

As a Qt developer, I find the former more elegant and self-documenting.
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Are slots even needed these days?

2016-03-19 Thread Bob Hood

On 3/16/2016 5:02 PM, Scott Aron Bloom wrote:
I find them both pretty bad L…  I have spent too much time, looking at other 
people’s code trying to figure out “why” it wont connect, only to realize 
someone had snuck in a “private:” second so moc didn’t generate the slot 
information.


I prefer “slotFoo” and “slotBar” as well as “sigFoo” and “sigBar”


It really lets the methods stand out as slots and signals.. It also means, 
don’t think “sender()” can ever valid if you are not in a “slotXYZ” function.





I actually prefix my slot method names with "slot_" and signals with "signal_" 
so they are also easily identifiable in the C++ module as I'm looking through 
the code.  More self-documentation.
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Speeding up linking for iOS?

2016-02-15 Thread Bob Hood

On 2/15/2016 3:00 PM, Thiago Macieira wrote:

On segunda-feira, 15 de fevereiro de 2016 18:24:48 PST Jason H wrote:

It takes forever for my app to link for iOS. Is there anyway to speed this
up?

Upgrade to 5.7 and start using the shared library build of Qt for iOS.


5.7?  Did I miss an entire release of Qt?  I only see 5.5 as the highest 
available in the official releases download.


___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


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

2016-01-28 Thread Bob Hood


On 1/28/2016 2:55 PM, Bernhard Lindner wrote:

What version management software should I try to install in your opinion?


Mercurial.  https://www.mercurial-scm.org/

It has a lot of the features of git, but it's design decisions actually makes 
sense, especially if you're coming from Subversion. There are also extensions 
that let you inter-operate with git if you need to.


___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] [SOLVED] QSystemTrayIcon under OS X

2016-01-26 Thread Bob Hood

Found it.  Need to add:

 LSUIElement
 

to the Info.plist for the application, and it hides the launcher presence and 
the system menu.  The task tray icon still displays.



On 1/26/2016 3:18 PM, Bob Hood wrote:

Hey, guys.

I have a small "helper" Qt application that just adds an icon to the Windows 
task tray, and manages the life cycle of a process intended to run in the 
background.  This "helper" is just a convenient interface for the user.  It 
works fine under Windows. Appears in the task tray, provides a context menu, 
has no main window or other presence on the desktop.


This same code under OS X shows the icon in the OS X equivalent of the task 
try along with the context menu. However, it also shows an entry in the 
launcher at the bottom, and provides a second "standard" menu with 
"standard" menu options (i.e., options I did not create).


Whats the best way to hide these unneeded and unwanted extra items (launcher 
presence and system menu) so the behavior is consistent between the platforms?


Thanks.

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest



___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] QSystemTrayIcon under OS X

2016-01-26 Thread Bob Hood

Hey, guys.

I have a small "helper" Qt application that just adds an icon to the Windows 
task tray, and manages the life cycle of a process intended to run in the 
background.  This "helper" is just a convenient interface for the user.  It 
works fine under Windows. Appears in the task tray, provides a context menu, 
has no main window or other presence on the desktop.


This same code under OS X shows the icon in the OS X equivalent of the task 
try along with the context menu.  However, it also shows an entry in the 
launcher at the bottom, and provides a second "standard" menu with "standard" 
menu options (i.e., options I did not create).


Whats the best way to hide these unneeded and unwanted extra items (launcher 
presence and system menu) so the behavior is consistent between the platforms?


Thanks.

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] SOLVED: QStyledItemDelegate's sizeHint() height being ignored by QTableWidget?

2016-01-04 Thread Bob Hood

On 1/4/2016 8:38 AM, Elvis Stansvik wrote:

2016-01-04 16:19 GMT+01:00 Bob Hood <bho...@comcast.net>:

On 1/3/2016 7:30 PM, Bob Hood wrote:

Am I going to have to use a QTableView with a model in order to get the
height I need in each cell, or might this be a bug?


Since all my images are the same height, I solved this by directly calling
QTableWidget's inherited method setRowHeight().  This has expanded the row
height to fit the image content.  I can center images in that height in the
QStyledItemDelegate.paint() method if for some reason they don't fit
exactly.

However, it seemed more intuitive to me that the
QStyledItemDelegate.sizeHint() return value would cause the underlying
QTableView to make that adjustment for me.

I think you'll have to request that adjustment manually, with
resizeRowsToContents(). Not sure if you can have it done
automatically.


Hi, Elvis.

Yeah, I was doing that in the code as the last action.  I just didn't include 
it in the original post.


___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] SOLVED: QStyledItemDelegate's sizeHint() height being ignored by QTableWidget?

2016-01-04 Thread Bob Hood

On 1/3/2016 7:30 PM, Bob Hood wrote:
Am I going to have to use a QTableView with a model in order to get the 
height I need in each cell, or might this be a bug?


Since all my images are the same height, I solved this by directly calling 
QTableWidget's inherited method setRowHeight(). This has expanded the row 
height to fit the image content.  I can center images in that height in the 
QStyledItemDelegate.paint() method if for some reason they don't fit exactly.


However, it seemed more intuitive to me that the 
QStyledItemDelegate.sizeHint() return valuewould cause the underlying 
QTableView to make that adjustment for me.


___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] QStyledItemDelegate's sizeHint() height being ignored by QTableWidget?

2016-01-03 Thread Bob Hood
I'm using a QTableWidget (Qt 5.4.2) to display QImages in each cell of the 
table.  I'm using a QStyledItemDelegate for the table, and it overrides 
paint() and sizeHint().  Each QImage has been already been scaled from the 
original to 160x120, resulting in 160x108 due to maintaining aspect.  I'm 
using the examples/widgets/itemviews/stardelegate/ example as my guide on this 
one.


In my set up code, I set the delegate and the rows and columns:

ui->table_Thumbnails->setItemDelegate(new ThumbDelegate);
...
ui->table_Thumbnails->setColumnCount(cols);
ui->table_Thumbnails->setRowCount(rows);

and then I set the horizontal and vertical labels:

ui->table_Thumbnails->setHorizontalHeaderLabels(header_labels);
...
ui->table_Thumbnails->setVerticalHeaderLabels(header_labels);

then I populate each table cell with the QTableWidgetItems that have their 
data() set to the scaled QImage ("scale" defaults to 160x120):


QTableWidgetItem *item = new QTableWidgetItem(QTableWidgetItem::UserType);
...
item->setData(Qt::DisplayRole, image.scaled(scale, keep_aspect ? 
Qt::KeepAspectRatio : Qt::IgnoreAspectRatio));

ui->table_Thumbnails->setItem(row, col, item);

In my ThumbDelegate, I simply return the size of the QImage as the sizeHint():

if(index.data().canConvert())
{
QImage image = qvariant_cast(index.data());
return image.size(); // 160x108 due to aspect
}

and then in my paint(), I just paint the QImage into the cell's rectangle:

if(index.data().canConvert())
{
QImage image = qvariant_cast(index.data());

painter->save();

painter->setRenderHint(QPainter::Antialiasing, true);
painter->setPen(Qt::NoPen);
painter->setBrush(option.palette.foreground());
painter->drawImage(option.rect, image);

painter->restore();
}

This is resulting in cells that appear to be the correct width, but whose 
heights are nowhere near the 108 pixels of the QImage. So, of course, my 
images are squashed up into the available space to a point where they are not 
discernible:




Am I going to have to use a QTableView with a model in order to get the height 
I need in each cell, or might this be a bug?
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


  1   2   3   >