[Qt-interest] Set the column width for QTreewidget to fixed

Nitish Jha nitishjham at gmail.com
Tue Aug 11 21:59:14 CEST 2009


thanks Lars , works nicely :-)
nitish

On Tue, Aug 11, 2009 at 5:32 PM, <qt-interest-request at trolltech.com> wrote:

> Send Qt-interest mailing list submissions to
>        qt-interest at trolltech.com
>
> To subscribe or unsubscribe via the World Wide Web, visit
>        http://lists.trolltech.com/mailman/listinfo/qt-interest
> or, via email, send a message with subject or body 'help' to
>        qt-interest-request at trolltech.com
>
> You can reach the person managing the list at
>        qt-interest-owner at trolltech.com
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Qt-interest digest..."
>
>
> Today's Topics:
>
>   1. Re: properties order in Qt designer plugins (Giacomo)
>   2. Overlaying an image (png or jpg with text) over the       screen.
>      (Damian Hischier)
>   3. QTableView and spans (Lars Amsel)
>   4. Re: sql error in different machines...
>      (Christopher Rasch-Olsen Raa)
>   5. Re: Set the column width for QTreewidget to fixed (Lars Amsel)
>   6. Re: unable to bind to limited broadcast on Mac    (perror)
>      (Lars Amsel)
>   7. QMake ignores .prf file in project's root dir (Benjamin Kircher)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Tue, 11 Aug 2009 16:35:29 +0200
> From: Giacomo <giacomo.strangolino at elettra.trieste.it>
> Subject: Re: [Qt-interest] properties order in Qt designer plugins
> To: qt-interest at trolltech.com
> Message-ID:
>        <200908111635.29796.giacomo.strangolino at elettra.trieste.it>
> Content-Type: Text/Plain;  charset="iso-8859-1"
>
> On Tuesday 11 August 2009 14:50:33 Friedemann Kleint wrote:
> > Hi,
> >
> > > > In my designer widget plugin I have some Q_PROPERTies to personalize.
> > > >
> > > > I would like to know if there is a way to define an order in which
> > > > those properties have to be executed.
> > > >
> > > > For esample, supposing that the widget plugin has two Q_PROPERTies:
> > > >
> > > > Q_PROPERTY(a, READ a WRITE setA,,)
> > > >
> > > > Q_PROPERTY(b, READ b WRITE setB,,)
> >
> > This issue exists in Qt as well. For example, if you set checkable=true
> on
> > a QPushButton, you can set checked=true only after that call.
> >
> > The declaration in qabstractbutton.h looks like:
> >
> >  Q_PROPERTY(bool checkable READ isCheckable WRITE setCheckable)
> >  Q_PROPERTY(bool checked READ isChecked WRITE setChecked DESIGNABLE
> > isCheckable ....)
> >
> > uic will set the properties in that order and all will work well. Note
> how
> > the boolean DESIGNABLE function influences the enabling of the property
> in
> > Qt Designer.
> >
> > Regards,
> > Friedemann
>
> First of all, many thanks.
>
> I have a property that sets up a poller and a property that sets up a
> polling
> period, and another one that sets up a read mode (defined in an
> enumeration)
>
> setSource(QString sourceName)
> setPeriod(int milliseconds)
> setRefreshMode(enum mode)
>
>
> While designing, I am free to change the source name and the source period
> without constraints on which should be set first. The same goes for the
> mode.
> Moreover, period and mode have their defaults, so while designing I am not
> compeled to change them.
>
> source property is DESIGNABLE false by default, and is set by a Custom
> designer widget interface.
>
> When I run the application, I need to always set mode and period before
> starting the polling with the source name, for efficiency reasons.
> So it is important that setSource() is called after the previous two, but
> without restrictions during GUI design.
>
> If I well understood your advice, I could force the uic to put the calls in
> the desired order by setting the Q_PROPERTY like this, assuming that the
> enumeration starts from 0 and the timeout is greater  than 0:
>
> Q_PROPERTY(int mode, READ mode, WRITE setMode DESIGNABLE true)
> Q_PROPERTY(int period, READ period, WRITE setPeriod DESIGNABLE true)
>
> Q_PROPERTY(QString source  READ source WRITE setSource DESGNABLE period > 0
> &&
> mode > 0)
>
> although I would like to maintain the property source DESIGNABLE false to
> go
> on setting it through the custom widget interface.
>
> Best regards and thanks again.
>
> Giacomo.
>
> Elettra - Synchrotron Light Radiation Facility - Trieste
> http://www.elettra.trieste.it
>
>
>
>
>
> ------------------------------
>
> Message: 2
> Date: Tue, 11 Aug 2009 16:42:54 +0200
> From: Damian Hischier <himbow at gmail.com>
> Subject: [Qt-interest] Overlaying an image (png or jpg with text) over
>        the     screen.
> To: qt-interest at trolltech.com
> Message-ID:
>        <3d64872f0908110742h34cfb442w3f578ab90a0c2a98 at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> I have to display an image and text on the screen. The image just has
> to pop up and show the user some information and after a couple of
> seconds it should disappear again. That means that when the image pops
> up it should not distract the user and steal the focus or something
> like this. The image should just be an overlay over the a part of the
> screen.
>
> What is the best way to do something like that?
>
> Thanks for your help
>
> Damian
>
>
> ------------------------------
>
> Message: 3
> Date: Tue, 11 Aug 2009 16:57:01 +0200
> From: Lars Amsel <lars.amsel at signalion.com>
> Subject: [Qt-interest] QTableView and spans
> To: qt-interest at trolltech.com
> Message-ID: <h5s0rt$77t$1 at eple.troll.no>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> Hi,
>
> I want to use a table view with spans. The model behind is a list with
> transaction. Each transaction has several actions. I want to display all
> actions in that table. The first column should display the transaction
> itself.
>
> This should look like this (monospaced font)
>
> +----+---------------+
> | T1 | action a      |
> +----+---------------+
> |    | action x      |
> | T2 | action y      |
> |    | action z      |
> +----+---------------+
> | T3 | action z      |
> +----+---------------+
>
> The spans works in Qt 4.5 I am using. What I don't like is, that I have to
> set
> the spans in the view component. I would rather implement this information
> on
> the model size (somehow), but there seems to be no support in Qt itself,
> neither in the QAbstractTableModel nor in the QTableView.
>
> Is it planned to support spans on the model side in future versions? Or is
> there a special trick I don't know to have such simple spans without
> writing a
> single line of code on the view side?
>
> regards
>
> Lars
>
>
> ------------------------------
>
> Message: 4
> Date: Tue, 11 Aug 2009 16:56:28 +0200
> From: Christopher Rasch-Olsen Raa <christopher at technophile.info>
> Subject: Re: [Qt-interest] sql error in different machines...
> To: qt-interest at trolltech.com
> Message-ID: <200908111656.28462.christopher at technophile.info>
> Content-Type: Text/Plain; charset=utf-8
>
> You did not mention qsqlmysql4.dll. where did you put that. Again; as we've
> asked: what does the pluginsystem say?
> --
> Christopher
>
>  Tirsdag 11 august 2009 15:12:54 skrev berkan k?sao?lu :
> > Yes, there is something wrong , but i dont think it is with the plugin.
> > * I have compiled the .dll's relevant on my own computer. then i carried
> > the dlls to another computer.( QtCored4.dll, QtGuid4.dll, QtSqld4.dll and
> > mingwm10.dll )
> > * I have build the plugin/mysql driver on my computer
> > On the other computer, all i do is,
> > * installing another mysql database, with the same version ( both my
> driver
> > dll and server)
> > after i installed mysql database, with the same version.
> > * I created the databases as the same on my own computer.
> > * then i click the executable , i can not connect.
> >
> > "
> > QSqlDatabase db = QSqlDatabase::addDatabase("QMYSQL");
> >
> > db.setHostName(strlist[0]);
> >
> > db.setDatabaseName(strlist[1]);
> >
> > db.setUserName(strlist[2]);
> >
> > db.setPassword(strlist[3]);
> >
> > bool ok = db.open();
> >
> > if(ok){
> >
> > QSqlDatabase defaultDB = QSqlDatabase::database(); //database baglantim
> > kuruldu ona isim verdim.
> >
> > setupUi(this); // this sets up GUI
> >
> > }
> >
> > else{
> >
> >       // give error message
> >
> > }
> >
> > "
> >
> > i have smth like that.
> >
> > my executable and dll files are in the same directory, and the
> application
> > always enters the 'else' state.
> >
> >
> > what can be ? i will look the db.lastError()
> > although i have the dll file, missing driver can be a reason ?
> >
> > thanks  in advice
> >
> >
> >
> > On Tue, Aug 11, 2009 at 3:50 PM, Christopher Rasch-Olsen Raa <
> >
> > christopher at technophile.info> wrote:
> > > On Tuesday 11 August 2009 14:53:49 berkan k?sao?lu wrote:
> > > > I have an executable compiled on my windows computer.
> > > > But, when i try to execute on different windows machines, i can not
> > >
> > > connect
> > >
> > > > to the database.
> > > > i have all my dll's, files etc...
> > > > but i can not establish a connection.
> > > >
> > > > what can be the reason ?
> > >
> > > You have done something wrong when compiling the plugin perhaps? Try to
> > > look
> > > at what Qt's pluginsystem tells you when the MySQL-plugin is loaded.
> > >
> > > --
> > > Christopher
> > >
> > > _______________________________________________
> > > Qt-interest mailing list
> > > Qt-interest at trolltech.com
> > > http://lists.trolltech.com/mailman/listinfo/qt-interest
>
>
>
>
> ------------------------------
>
> Message: 5
> Date: Tue, 11 Aug 2009 17:19:46 +0200
> From: Lars Amsel <lars.amsel at signalion.com>
> Subject: Re: [Qt-interest] Set the column width for QTreewidget to
>        fixed
> To: qt-interest at trolltech.com
> Message-ID: <h5s26f$9vq$1 at eple.troll.no>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> Nitish Jha wrote:
> > I am using the QTreeWidget with pyQt binding. I am using the QTreeWidget
> > as a list and i wanted to know if it is possible to set the columnwidth
> > to be fixed
>
> treeWidget->header()->setResizeMode(QHeaderView::Fixed);
>
> > and to also not allow the user to move the columns.
>
> treeWidget->header()->setMovable(false);
>
> regards
>
> Lars
>
>
> ------------------------------
>
> Message: 6
> Date: Tue, 11 Aug 2009 17:31:15 +0200
> From: Lars Amsel <lars.amsel at signalion.com>
> Subject: Re: [Qt-interest] unable to bind to limited broadcast on Mac
>        (perror)
> To: qt-interest at trolltech.com
> Message-ID: <h5s2s0$bgj$1 at eple.troll.no>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> Hi,
>
> Bart Swinnen wrote:
> > I'm unable to bind a udp socket to the limited broadcast address on Mac.
> > Using Qt4.5.2 sdk on Mac 10.4.11
> > Is there a way to find out what error code is returned from the OS? Is
> > ti possible this address is already in use and locked by other socket on
> > the system?
> > Can someone verify this problem and let me know if and how I can
> > successfully bind the socket?
>
> I can't help you with the problem itself.
>
> Maybe this could help you find a clue:
>
> if (!m_udpSocket->bind(QHostAddress::Broadcast, m_udpPort)) {
>   qError() << m_udpSocket->errorString();
> }
>
> regards
>
> Lars
>
>
> ------------------------------
>
> Message: 7
> Date: Tue, 11 Aug 2009 17:30:57 +0200
> From: Benjamin Kircher <benjamin.kircher at gmail.com>
> Subject: [Qt-interest] QMake ignores .prf file in project's root dir
> To: qt-interest at trolltech.com
> Message-ID:
>        <73bc18b90908110830o74971f85o290c22e2ffebf788 at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hello folks,
>
>
> The documentation at [1] says that it looks for a feature-file in the
> project's root dir. I have a foo.prf in my project's root dir and added foo
> to my CONFIG variable like
>
> CONFIG += debug_and_release build_all warn_on foo
>
>
> However, qmake doesn't read this file. Running
>
> qmake -d -d -spec $(QTDIR)\mkspecs\win32-msvc2005 -tp vc 2>&1 | tee
>
> reveals that qmake doesn't look in the project's root directory:
>
> DEBUG 2: Looking for feature 'foo.prf' in
>
> (::$(QTDIR)\mkspecs\win32-msvc2005\features::C:\Qt\mkspecs\features\win32::C:\Qt\mkspecs\features::C:\Qt\mkspecs\features\win32::C:\Qt\mkspecs\features)
>
>
> Am I doing something wrong? Is there another way to include my .prf file?
>
>
> [1]
>
> http://doc.trolltech.com/4.5/qmake-advanced-usage.html#adding-new-configuration-features
>
>
>
> Thanks in advance
>
> Benjamin Kircher
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> http://lists.trolltech.com/pipermail/qt-interest/attachments/20090811/de663594/attachment.html
>
> ------------------------------
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
>
> End of Qt-interest Digest, Vol 9, Issue 87
> ******************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090811/c7a5999b/attachment.html 


More information about the Qt-interest-old mailing list