Re: [Interest] Compile Qt Application with X11 libraries for Windows Platform

2012-06-25 Thread Lincoln Ramsay
On 06/25/2012 04:14 PM, ext Fatih Küçükyavuz wrote:
 Is there any way to build my Qt application with X11 support
 that can run in Windows OS?

I was going to say cygwin.

 There is also a XPortMinGW project for minGW. But I do not know if it
 works for Qt applications.

This will be mostly the same as cygwin but with a different POSIX layer 
between you and win32.

You should be fine to build Qt for Unix/X11 under either of these 
environments and then build your app against that. You'll be using the 
environment's toolchain (so, gcc or mingw-gcc rather than MSVC).

-- 
Lincoln Ramsay - Senior Software Engineer
Qt Development Frameworks, Nokia - http://qt.nokia.com/


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


Re: [Interest] HTML5 canvas support?

2012-06-25 Thread Jason H
To answer your questions,
1. No, You'll have to use CSS and such to style them, and come up with specific 
POST handlers for every possible input. If that's what you want then use Wt. 
The advantage here is that there is only ever one POST handler, which handles 
browser events like KEY UP/DOWN, and MOUSE MOVE, BUTTON UP/DOWN. Another 
advantage is you can style it using Qt Style Sheets. Really I made this so I 
could put a legacy Qt application on the web. No [Adobe] plugins required!
2. UI Files, as made by Qt Designer or Creator. 

3. Don't worry about the license. My thing is that I want something for my 
resume. And I didn't want people finishing it before I had a better effort in 
place. With GTK's Broadway already complete, I will be creating Vaudeville, the 
Qt version, as soon as I get time and 5.0 is out (QPA interfaces will be 
'finalized').





 From: Jonathan Greig redteam...@gmail.com
To: Jason H scorp...@yahoo.com 
Cc: Interests Qt interest@qt-project.org 
Sent: Sunday, June 24, 2012 8:09 AM
Subject: Re: [Interest] HTML5 canvas support?
 

Jason,
I think it's cool. I would have been nice if you had at least included the 
private files needed, but I hunted them down and got it working;) I'm trying to 
build Qt remotely on a web server so I can try to use it for CGI scripts so 
maybe your concept will come in handy.

I'm not very familiar with some of Qt's web capabilities but wouldn't it make 
more sense to generate actual html checkboxes and radiobuttons for some of 
that? I can see some interesting uses for the canvas but was wondering if there 
is anything else that does say an entire html page layout? Is this uncharted 
territory or can Qt already do this?

Your license is a little odd. Why don't you just include your email in the 
files and state that your releasing the code into the public domain or just use 
the zlib license: http://www.gzip.org/zlib/zlib_license.html

Sorry for such a delayed response on this. I have been busy but knew I would 
come back to this to check it out. Luckily my memory served me well and found 
your post. Good job nonetheless, I will study and play around with it some more 
later this week.


On Thu, Mar 29, 2012 at 2:50 PM, Jason H scorp...@yahoo.com wrote:

No one else thought this was cool?




 From: Jason H scorp...@yahoo.com
To: Interests Qt interest@qt-project.org 
Sent: Wednesday, March 28, 2012 2:24 PM
Subject: [Interest] HTML5 canvas support?
 



I think we should be able to paint to a HTML5 canvas.

I created the attached PoC, modeled after QPicture. See main.cpp for an 
example.


The code is released with the following license: 

USE: Use at your own risk. Use it as you wish with no warranties or fitness 
expressed or implied. 
COPYING/DISTRIBUTION: Don't claim the original code is yours, that would  be 
wrong. Please attribute the original code to me. (It's a resume thing) It is 
your responsibility to put my email address in the file headers. You may use 
the code in Open and Closed Source projects, and assign what ever license and 
copyright as you wish. I don't assert any copyright, just credit.

Details:
The rendering is pretty good I've noticed fonts are not pixel-perfect but 
pretty close. The HTML5 canvas system (at least in FireFox) needs a 0.5px 
offset to generate a line properly, so things may be a tad off.

If you browser supports HTML
 I'm attaching sample output. (123.html)

I'd love to see how you use this. Feel free to show me.

___
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 mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] ICS Announces Qt-Based Google APIs

2012-06-25 Thread Harri Pasanen
I took a quick look at qt-google-calendar, but it's unclear to me how 
the authentication is supposed to work?


Basically the code expects you to fill in response uri, but does not 
implement the server for it?
What am I supposed to put in there (m_strRedirectURI)?Reading google 
docs it should probably be http://localhost:port
but then I should have a server listening there (or oauth2 should 
provide one).


Confused,

Harri


On 06/20/2012 03:52 PM, Justin Noel wrote:

On 06/19/2012 03:48 PM, Till Oliver Knoll wrote:
Am 19.06.2012 um 20:21 schrieb Lynn Gray lg...@ics.com 
mailto:lg...@ics.com:



  * *Google Maps* -- embed Google Maps images or Street View
panoramas without the need for JavaScript.

Just out of curiosity: is this a Google Map, shown via a WebKit view, 
controlled (internally) via the Google JavaScript API which is 
exposed as C++ methods?





The main developer of these packages just left on a well deserved 
vacation. I wasn't directly involved with this project but I may be of 
assistance here. The map in particular is a WebView + javascript 
wrappers. Most of the other google apis are accessed directly without 
webview, etc. If anyone has more questions you can fire them my way.


Thanks!
--Justin


___
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] Dynamically Resizing the height of a Row in a QTableWidget or QTableView

2012-06-25 Thread Eric Clark
Hello Mike,

I am not sure about dynamically resizing the row height, but I have a 
suggestion that you may or may not find helpful...

Instead of placing the entire portion of text in the table cell, why not use 
the QFontMetrics::elidedText(...) function to add ellipsis to the left, right 
or middle of your text and then set the tooltip on the cell to show the entire 
text when the text is too long? 

Hope this helps...
Eric

 -Original Message-
 From: interest-bounces+eclark=ara@qt-project.org [mailto:interest-
 bounces+eclark=ara@qt-project.org] On Behalf Of Michael Jackson
 Sent: Monday, June 25, 2012 3:35 PM
 To: Interests Qt
 Subject: [Interest] Dynamically Resizing the height of a Row in a
 QTableWidget or QTableView
 
 Is it possible to dynamically set the row height based on the amount of text
 that needs to be displayed? We are trying to display some error messages in
 a table and some of the messages are very short (just a few words) and
 some of very long (lots and lots of words). Can this be done with a
 QTableWidget or should we move to a QTableView and custom model? Does
 anyone have any example code?
 
 Thanks
 ---
 Mike Jackson
 ___
 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] QAbstractItemView and default QItemSelectionModel

2012-06-25 Thread Eric Clark
Thanks Andreas! I know it doesn't exactly answer my question, but you are 
right, I can easily check this and I probably should just do the right thing 
anyway and delete it. However, this suggestion:

Or you could make sure the selection model is set before the model, so that no 
default-selection-model is created at all

I am curious about this because according to the Qt documentation on 
QAbstractItemView::setSelectionModel this would not work. Maybe I am misreading 
what it says though. Here is what it reads:

Note that, if you call 
setModelhttp://doc.trolltech.com/4.7/qabstractitemview.html#setModel() after 
this function, the given selectionModel will be replaced by one created by the 
view.

Do you think I am not reading this incorrectly?

Thanks You!
Eric

From: Andreas Pakulat [mailto:ap...@gmx.de]
Sent: Monday, June 25, 2012 4:41 PM
To: Eric Clark
Cc: Qt Interest (interest@qt-project.org)
Subject: Re: [Interest] QAbstractItemView and default QItemSelectionModel

Hi,
On Mon, Jun 25, 2012 at 11:12 PM, Eric Clark 
ecl...@ara.commailto:ecl...@ara.com wrote:
Hello All,

I have a curious question about the default QItemSelectionModel that is created 
whenever a QAbstractItemView is created: Is this default selection model 
parented to the view? What I really want to know is, if I create a new 
QAbstractItemView, set the model on it and then create a new 
QItemSelectionModel and pass it into the view's setSelectionModel() function, 
will the default selection model be deleted when the view is deleted? The 
documentation is a little hazy on this topic. It says that It is up to the 
application to delete the old selection model if it is no longer needed..., 
but that it will be deleted by its parent if it has one. So, I have a new view 
and I am changing its selection model to my own and the one that was created by 
default is no longer needed. Should I go ahead and delete the old default 
selection model, or is it safe to say it is parented to the view and will be 
deleted when the view is deleted?

You could just test what your version of Qt does with:

QAbstractItemView view;
QStandardItemModel model;
view.setModel(model);
QItemSelectionModel selmodl = view.selectionModel();
if( selmodel.parent() == view ) {
  fprintf(stderr, selection model is parented under view\n);
} else {
  fprintf(stderr, selection model has unknown/no parent\n);
}

Since the documentation does not state what behaviour is to be expected, you 
shouldn't rely on this however. Since in this case I can't imagine any possible 
bad side-effects of deleting the model even if it is parented under the view, 
you could just be a little less lazy and delete the selection-model before 
setting a new one. Or you could make sure the selection model is set before the 
model, so that no default-selection-model is created at all.

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


Re: [Interest] QAbstractItemView and default QItemSelectionModel

2012-06-25 Thread Eric Clark
Thank you again Andreas! I just wanted to get my head screwed on straight. I 
really appreciate your response and help! - Eric

From: Andreas Pakulat [mailto:ap...@gmx.de]
Sent: Monday, June 25, 2012 5:02 PM
To: Eric Clark
Cc: Qt Interest (interest@qt-project.org)
Subject: Re: [Interest] QAbstractItemView and default QItemSelectionModel

Hi,
On Mon, Jun 25, 2012 at 11:59 PM, Eric Clark 
ecl...@ara.commailto:ecl...@ara.com wrote:
Thanks Andreas! I know it doesn't exactly answer my question, but you are 
right, I can easily check this and I probably should just do the right thing 
anyway and delete it. However, this suggestion:

Or you could make sure the selection model is set before the model, so that no 
default-selection-model is created at all

I am curious about this because according to the Qt documentation on 
QAbstractItemView::setSelectionModel this would not work. Maybe I am misreading 
what it says though. Here is what it reads:

Note that, if you call 
setModelhttp://doc.trolltech.com/4.7/qabstractitemview.html#setModel() after 
this function, the given selectionModel will be replaced by one created by the 
view.

Do you think I am not reading this incorrectly?

No, you're reading it correctly, I was making up things - or rather 
mis-remembering and not checking the docs :)

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


[Interest] Most direct path to using a QComboBox to edit a cell in a QTableView?

2012-06-25 Thread K. Frank
Hello List!

I have a QTableView and I would like to use a QComboBox to insert and
modify its entries.  I'm looking for the simplest way to do this that uses
as much unmodified Qt functionality as possible.

At the moment I am thinking that I can use the class template
QStandardItemEditorCreator specialized on QComboBox as the most
direct way to do this.  Two questions:

Am I on the right track here?

What specifically do I need to do to make this work?  I don't really see
the full end-to-end logic (i.e., starting with a specific instance of a
QTableView) of how to hook all of the plumbing together.

(The model backing the QTableView happens to be a QSqlTableModel,
although -- and please correct me if I'm wrong -- this should be irrelevant.)

I've looked at a number of examples in the Qt documentation but the ones
I've found seemed to be concerned with writing custom delegates and
editors, rather than using existing delegate and editor classes already
provided by Qt.  Although I do believe I could achieve my end goal with
a custom delegate, I think using one would be more complicated than
necessary.  For example, as I understand it, QTableView uses QItemDelegate
as its default delegate, and that I can achieve my goal without changing this.

Assuming that I am on the right track, concrete details would be greatly
appreciated.  I'm lost in the multiple layers of the documentation at the
moment.

Thanks for any suggestions.


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


Re: [Interest] Most direct path to using a QComboBox to edit a cell in a QTableView?

2012-06-25 Thread Tony Rietwyk
Hi Frank, 

What does the standard delegate do for your model/view at the moment?  I
can't recall the specifics, but it certainly uses combo boxes at the moment
- eg, for boolean fields (which I think is painful, but anyway).  

I think you need to give more information about what you are expecting.  For
example, you include 'insert' as an action.  But what does this mean?  If a
user types an entry not already in the list, what do you expect to happen?
Which table would the new entry be inserted into?  

Where should the combo box get its values from?  

Yes I agree that the model view classes take a while to grok.  

Tony.

 Sent: Tuesday, 26 June 2012 2:36 PM
 
 Hello List!
 
 I have a QTableView and I would like to use a QComboBox to insert and
 modify its entries.  I'm looking for the simplest way to do this that uses
as
 much unmodified Qt functionality as possible.
 
 At the moment I am thinking that I can use the class template
 QStandardItemEditorCreator specialized on QComboBox as the most direct
 way to do this.  Two questions:
 
 Am I on the right track here?
 
 What specifically do I need to do to make this work?  I don't really see
the full
 end-to-end logic (i.e., starting with a specific instance of a
 QTableView) of how to hook all of the plumbing together.
 
 (The model backing the QTableView happens to be a QSqlTableModel,
 although -- and please correct me if I'm wrong -- this should be
irrelevant.)
 
 I've looked at a number of examples in the Qt documentation but the ones
 I've found seemed to be concerned with writing custom delegates and
 editors, rather than using existing delegate and editor classes already
 provided by Qt.  Although I do believe I could achieve my end goal with a
 custom delegate, I think using one would be more complicated than
 necessary.  For example, as I understand it, QTableView uses QItemDelegate
 as its default delegate, and that I can achieve my goal without changing
this.
 
 Assuming that I am on the right track, concrete details would be greatly
 appreciated.  I'm lost in the multiple layers of the documentation at the
 moment.
 
 Thanks for any suggestions.
 
 K. Frank


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