Re: [Interest] Dynamic translation
Hi If I search the ts files, that means I have to ship them with my application -Original Message- From: interest-bounces+graham.labdon=avalonsciences@qt-project.org [mailto:interest-bounces+graham.labdon=avalonsciences@qt-project.org] On Behalf Of Rainer Wiesenfarth Sent: 25 July 2015 07:49 To: interest@qt-project.org Subject: Re: [Interest] Dynamic translation Am 24.07.2015 um 16:38 schrieb Graham Labdon: Hi My Qt application supports dynamic translation IE the user can change languages whilst the application is running Now I have a need to find the English equivalent of a translated string and don't seem to be able to find a way Depending on the use case I see two options: 1. search the .ts file for the translated string 2. let the user switch to English (or, if possible, to an unsupported language) to get the original string Best Regards / Mit freundlichen Grüßen Rainer Wiesenfarth -- Software Engineer | Trimble Imaging Division Rotebühlstraße 81 | 70178 Stuttgart | Germany Office +49 711 22881 0 | Fax +49 711 22881 11 http://www.trimble.com/imaging/ | http://www.inpho.de/ Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim Eingetragen beim Amtsgericht Darmstadt unter HRB 83893, Geschäftsführer: Dr. Frank Heimberg, Hans-Jürgen Gebauer ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Dynamic translation
Hi My system maintains a system log which we require to be in English. Some of the strings used to log messages are also used to present information to the user in the selected language -Original Message- From: interest-bounces+graham.labdon=avalonsciences@qt-project.org [mailto:interest-bounces+graham.labdon=avalonsciences@qt-project.org] On Behalf Of André Somers Sent: 27 July 2015 07:38 To: interest@qt-project.org Subject: Re: [Interest] Dynamic translation Op 24-7-2015 om 16:38 schreef Graham Labdon: Hi My Qt application supports dynamic translation IE the user can change languages whilst the application is running Now I have a need to find the English equivalent of a translated string and don't seem to be able to find a way For example Given QString s = tr(Hello); I need to be able to get Hello from s after translation has taken place. Has anyone done this before or have any ideas on how (if) it can be achieved Why do you (think you) need to do that? What is it want to achieve with that original string? And in case you really need the original: keep the original around. André ___ 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] QDir::EntryList
Hi If I want to get a list of all files and sub folders in a folder, but excluding dot and dotdot I thought that this should do the trick QDir myDir(somepath); QStringList files = myDir.entryList(QDir::NoDotAndDotDot); However, this seems to return no strings Removing the filter returns the list as expected but including dot and dotdot Is this the correct behaviour or have I misunderstood something? Thanks ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
[Interest] Dynamic translation
Hi My Qt application supports dynamic translation IE the user can change languages whilst the application is running Now I have a need to find the English equivalent of a translated string and don't seem to be able to find a way For example Given QString s = tr(Hello); I need to be able to get Hello from s after translation has taken place. Has anyone done this before or have any ideas on how (if) it can be achieved Thanks ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
[Interest] List widget and drag and drop
Hi I have a QListWidget that I need to support drag and drop At the moment I have it so that I can drag an item from an different widget and have it added to the list But when I drag an item internal to the widget the target of the drop seems to be deleted from the list I need a list widget that supports both external drags and internal re ordering Has anyone any idea of how to do this? Thanks ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
[Interest] Simple sqlite database
Hi I am trying to open a sqlite database and display it in a QTableView but it is not working. Here is my code #include SimpleDb.h #include QSqlError #include QFile #include QSqlRelationalTableModel SimpleDb::SimpleDb(QWidget *parent) : QMainWindow(parent) { ui.setupUi(this); m_qsqlDatabase = QSqlDatabase::addDatabase(QSQLITE,TestDatabase.sqlite); m_qsqlDatabase.setDatabaseName(TestDatabase.sqlite); if (m_qsqlDatabase.open()) { QStringList existingTables = m_qsqlDatabase.tables(); m_model = new QSqlTableModel; m_model-setTable(Table2); m_model-select(); int columnCount = m_model-columnCount(); ui.tableView-setModel(m_model); } else { QString err = m_qsqlDatabase.lastError().databaseText(); int a; a = 10; } } The string list returned by `QStringList existingTables = m_qsqlDatabase.tables();` contains 2 tables and includes the value given to `m_model-setTable(Table2);` However `columnCount` is zero and no data is shown in my view I must be doing something wrong but I cannot see what Please can someone let me know what is wrong Thanks ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] SQLite
Hi Bo It would be really interesting to see your sources and I would be grateful if you could email them to me Thanks Graham -Original Message- From: Bo Thorsen [mailto:b...@vikingsoft.eu] Sent: 27 May 2015 21:56 To: interest@qt-project.org; Graham Labdon Subject: Re: [Interest] SQLite Den 27-05-2015 kl. 10:51 skrev André Somers: Graham Labdon schreef op 27-5-2015 om 09:39: Hi I am planning to use a SQLite database in my application to store application data. The application is large and complex so we are taking a phased delivery approach. This will mean that the structure of the database will change over time and that we need to provide backwards compatibility. So, what I need is some way to create a versioning system and a way of converting old format databases to the current format. I would be grateful if anyone could suggest a good approach to this Thanks ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest We do it manually. We keep a data version number in the database properties, which you can set and get via a pragma. Then, we have a list of updater objects that can update a database from one version to the/a next using a script. For every database change we need to make, we up the version number we expect, update the code to create a new database and write an updater script from the previous version. We run the scripts we need to update to the version expected by the software at startup. So, if you run the software against a version 7 database and the software expects version 10, it will go through the scripts looking for a script that updates version 7. The updater that takes a version 7 then updates to version 8, so the software will look for a script that takes a version 8 database. This updater can then update to version 10 in for instance, skipping version 9 that may have been faulty in some sense. It is quite easy to extend and reasonably flexible in terms of making it possible to create scripts that skip version numbers if that makes sense, but not make it mandatory to write a separate script between each possible version. Note that we don't support going backwards. That sometimes causes problems when clients want to reinstall a previous version because of some regression. I have a similar approach to this, except that I code generate the db code. Some tables can be generated based on the contents of other tables, so those are just wiped when upgrading a table to a new version. For those that can't be generated, I have to implement an upgrade function. I have been meaning to clean this up a bit and allow others to use it, but so far haven't found the time. Graham (or anyone else who might be interested), if you want to see it, I could send you the sources for the code generator. Bo. -- Viking Software Qt and C++ developers for hire http://www.vikingsoft.eu ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] SQLite
Thanks -Original Message- From: interest-bounces+graham.labdon=avalonsciences@qt-project.org [mailto:interest-bounces+graham.labdon=avalonsciences@qt-project.org] On Behalf Of André Somers Sent: 27 May 2015 09:52 To: interest@qt-project.org Subject: Re: [Interest] SQLite Graham Labdon schreef op 27-5-2015 om 09:39: Hi I am planning to use a SQLite database in my application to store application data. The application is large and complex so we are taking a phased delivery approach. This will mean that the structure of the database will change over time and that we need to provide backwards compatibility. So, what I need is some way to create a versioning system and a way of converting old format databases to the current format. I would be grateful if anyone could suggest a good approach to this Thanks ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest We do it manually. We keep a data version number in the database properties, which you can set and get via a pragma. Then, we have a list of updater objects that can update a database from one version to the/a next using a script. For every database change we need to make, we up the version number we expect, update the code to create a new database and write an updater script from the previous version. We run the scripts we need to update to the version expected by the software at startup. So, if you run the software against a version 7 database and the software expects version 10, it will go through the scripts looking for a script that updates version 7. The updater that takes a version 7 then updates to version 8, so the software will look for a script that takes a version 8 database. This updater can then update to version 10 in for instance, skipping version 9 that may have been faulty in some sense. It is quite easy to extend and reasonably flexible in terms of making it possible to create scripts that skip version numbers if that makes sense, but not make it mandatory to write a separate script between each possible version. Note that we don't support going backwards. That sometimes causes problems when clients want to reinstall a previous version because of some regression. We save backups of the database when we upgrade to help us mitigate problems (we have had a faulty database update script once, and that caused massive headaches to solve). A problem is that SQLite only supports a small subset of the DDL. Changing tables is hardly possible. That results in having to write more complicated scripts that create a new table with the modified structure, and then copy over the data from the old table, then delete the original table and rename the new table to the old one. That is a procedure in which it is easy to make a small mistake with big consequences. So I'd also advise to instigate a strict code review policy on any changes to database structure: every change, no matter who made it, needs a code review. André ___ 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] SQLite
Hi I am planning to use a SQLite database in my application to store application data. The application is large and complex so we are taking a phased delivery approach. This will mean that the structure of the database will change over time and that we need to provide backwards compatibility. So, what I need is some way to create a versioning system and a way of converting old format databases to the current format. I would be grateful if anyone could suggest a good approach to this Thanks ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
[Interest] sqlite
Hi My application makes use of an sqlite database that needs to be shared amongst multiple instantiations of the application. Can anyone please suggest how I can implement this such that if one instantiation of the application updates the database then any other instantiations that are running get notified. Thanks ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] QLockFile
Hi Yes, just figured that out. I need to get the lock then open the real file Thanks for your help -Original Message- From: interest-bounces+graham.labdon=avalonsciences@qt-project.org [mailto:interest-bounces+graham.labdon=avalonsciences@qt-project.org] On Behalf Of André Somers Sent: 23 February 2015 11:12 To: interest@qt-project.org Subject: Re: [Interest] QLockFile Graham Labdon schreef op 23-2-2015 om 12:06: Hi It seems that I needed to do a removeStaleLockFile when I had previously stopped my program via the debugger. I can now get a lock on the file, however, I cannot now open it for writing. Why would you want to write to a lock file? A lock file protects a resource, it isn't the same as the resource itself. I have not checked, but I guess the implementation writes the pid of the process that created the file into the file, and expects this to be the only content of the file. This is the pseudo code for what I need to do Lock file Open file Write text Close file Unlock file Is this the correct way ? - I guess not as I cannot open the file for writing That is because the file is not yours to write to. It is owned by QLockFile. At least, that is how I understand it. André Thanks -Original Message- From: interest-bounces+graham.labdon=avalonsciences@qt-project.org [mailto:interest-bounces+graham.labdon=avalonsciences.com@qt-project.o rg] On Behalf Of André Somers Sent: 23 February 2015 10:44 To: interest@qt-project.org Subject: Re: [Interest] QLockFile Graham Labdon schreef op 23-2-2015 om 11:36: Hi QString path = C:\jobs\Test1\job.xcfg; QFile file(path); bool res = file.open(QIODevice::WriteOnly); here res is true But, the path is once again wrong. Use \\ or /, but not \ in string literal paths. BUT QString path = C:\jobs\Test1\job.xcfg; QLockFile lock(path); bool res = lock.tryLock(); here res is false BUT QLockFile lock(C:\jobs\Test1\job.xcfg); bool res = lock.tryLock(); here res is true! And you are sure that you are only locking once? And what does error() return when tryLock fails? André P.S. Please keep the discussion on the list, not in private mail. Thanks for your time -Original Message- From: interest-bounces+graham.labdon=avalonsciences@qt-project.org [mailto:interest-bounces+graham.labdon=avalonsciences.com@qt-project. o rg] On Behalf Of André Somers Sent: 23 February 2015 10:15 To: interest@qt-project.org Subject: Re: [Interest] QLockFile Graham Labdon schreef op 23-2-2015 om 11:10: Yes I am sure I have tried this with numerous file locations and different ways of constructing a QLockFile and the ONLY on that works is if I hard code an non escaped file path. The non-escaped path will point to a different location than what you think it points to. That may be why that one succeeds. I have used QLockFile successfully (with dynamic paths). So, there really is something wrong with your way of using it, not with QLockFile itself. Did you try opening a file yourself at the location you want from code using QFile and opening it write only? What happens if you do that? André -Original Message- From: André Somers [mailto:an...@familiesomers.nl] Sent: 23 February 2015 10:07 To: Graham Labdon Subject: Re: [Interest] QLockFile Graham Labdon schreef op 23-2-2015 om 11:00: Hi The filePath is definitely valid The only way I can get QLockFile to work at the moment is by hard coding an invalid c string as in my example. If I use double backslashes in the hard code version tryLock fails Are you sure you can actually write at that location? André ___ 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 ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
[Interest] QLockFile
Hi I am trying to use QLockFile in a function that receives a file path as a QString. When I pass the string directly to the constructor of QLockFile and the call tryLock it always fails. However, if I hard code the string the lock succeeds (although I get compiler warnings about unknown escape sequences) If I user the toNativeSeparators method of QDir on my file path the call to tryLock fails although in the debugger the value of the converted string appears to the same as the hard coded value. I would be grateful if someone could explain this behaviour FileDestination::FileDestination(const QString filePath) { QLockFile lockFile(filePath); // tryLock fails QString s = QDir::toNativeSeparators(filePath) QLockFile lockFile2(s); // tryLock fails QLockFile lockFile3(C:\jobs\Myjob.txt); // tryLock succeeds bu get compiler warnings for unknown escape sequences } ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] QsqlTableModel
There are no other queries -Original Message- From: Jason H [mailto:jh...@gmx.com] Sent: 18 February 2015 14:07 To: Graham Labdon Cc: Interest@qt-project.org Subject: Re: [Interest] QsqlTableModel From: Graham Labdon graham.lab...@avalonsciences.com Hi I am attempting to use QSqlTableModel to delete rows from an Sqlite database. - model-select(); bool b = model-removeRows(0,200); model-submitAll(); The return value is false, so I thought I would get the last error using QSqlError e = model-lastError(); However, this error has a type of NoError and all the error strings are empty Can someone tell me what I am doing wrong? One thing to check is that no other queries are open. I continually ran into problems with SQLite when I had another open. It'll make a large .journal file, but when the program exits, everything in the journal is lost. You could be getting false because it is still pending. I'm not sure that is your problem, but that is one thing to check. ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
[Interest] QsqlTableModel
Hi I am attempting to use QSqlTableModel to delete rows from an Sqlite database. - model-select(); bool b = model-removeRows(0,200); model-submitAll(); The return value is false, so I thought I would get the last error using QSqlError e = model-lastError(); However, this error has a type of NoError and all the error strings are empty Can someone tell me what I am doing wrong? Thanks ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
[Interest] QSqlDatabase
Hi I am just starting to explore Qt support for databases and have this as a first attempt to open a data base QSqlDatabase db = QSqlDatabase::addDatabase(QSQLITE); db.setHostName(bigblue); db.setDatabaseName(flightdb); db.setUserName(acarlson); db.setPassword(1uTbSbAs); bool ok = db.open(); When I run this ok is always true, no matter what arguments are passed. I would be grateful if someone could explain this Thanks ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
[Interest] QFileDialog
Hi In my application I want that all file dialogs set the DontUseNativeDialog flag. Is this possible by using style sheets or do I have to subclass file dialog and make sure that developers use this subclass? Is there a better way Thanks for your time ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] how to debug a Qt Designer plugin
Hi It was a missing path to dependant libraries Thanks for the hint Graham From: interest-bounces+graham.labdon=avalonsciences@qt-project.org [mailto:interest-bounces+graham.labdon=avalonsciences@qt-project.org] On Behalf Of Tony Rietwyk Sent: 10 December 2014 23:49 To: Interest@qt-project.org Subject: Re: [Interest] how to debug a Qt Designer plugin Hi Graham, It could be several things: - the plugin has been compiled with debug - it must be release build. - supporting DLLs are not available in your path. - the code in the plugin is relying on initialisation that only occurs in your main exe. Because of the first point, you can't run Designer and debug the plugin. Also note that a single plugin can contain all of your widgets, you don't need a separate plugin for each. See QDesignerCustomWidgetCollectionInterface. Hope that helps, Tony From: interest-bounces+tony=rightsoft.com...@qt-project.orgmailto:interest-bounces+tony=rightsoft.com...@qt-project.org [mailto:interest-bounces+tony=rightsoft.com...@qt-project.org] On Behalf Of Graham Labdon Sent: Thursday, 11 December 2014 3:28 AM To: Interest@qt-project.orgmailto:Interest@qt-project.org Subject: [Interest] how to debug a Qt Designer plugin Hi I have developed some designer plugins that are working nicely. Now I have created another but cannot get it to work. Within designer I see the following when I do Help-about Plugins - Failed Plugins C:\Qt\Qt5.3.0\5.3\msvc2012_opengl\plugins\designer\QtDesignerWidgets.dll Cannot load library C:\Qt\Qt5.3.0\5.3\msvc2012_opengl\plugins\designer\QtDesignerWidgets.dll The specified module could not be found Can anyone give me some idea as to how to debug this thanks ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
[Interest] how to debug a Qt Designer plugin
Hi I have developed some designer plugins that are working nicely. Now I have created another but cannot get it to work. Within designer I see the following when I do Help-about Plugins - Failed Plugins C:\Qt\Qt5.3.0\5.3\msvc2012_opengl\plugins\designer\QtDesignerWidgets.dll Cannot load library C:\Qt\Qt5.3.0\5.3\msvc2012_opengl\plugins\designer\QtDesignerWidgets.dll The specified module could not be found Can anyone give me some idea as to how to debug this thanks ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
[Interest] Styled tabs
Hi I have a style sheet for QTabWidget and QTabBar that looks ok except that I cannot figure out how to make the tab width dependant on the text that it is displaying. Currently I have this as a fixed value but when I add a new tab with a wider label I have to adjust the style sheet. Is there a way of doing this dynamically? here is my style sheet QTabWidget, QStackedWidget { background: none } QTabWidget QWidget { background-color: lightblue; } QTabWidget::pane { border: 0px; top: 0.1em; border-image: url(tabBG.png); border-width: 1px; border-style: solid; border-color: grey; } QTabBar::tab { width: 120px; margin-left: 0.5; margin-right: 0.5; border: 1px solid #7a7a7a; border-top-left-radius: 4px; border-top-right-radius: 4px; padding: 2px 6px 2px 6px; } QTabBar::tab:!selected { margin-top: 2px; } QTabBar::tab:selected { margin-top: -1px; background-color: lightblue; borderwidth: 0px; } QTabBar::tab::bottom { border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-top-left-radius: 0px; border-top-right-radius: 0px; padding: 2px 6px 2px 6px; } ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
[Interest] get english translation
Hi My application is internationalized, however, in some circumstances I need the English version of the string no matter what translator is being used. Anyone have any suggestions on how to achieve this? Thanks ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
[Interest] Qt Designer Plugin
Hi I have developed a Qt Designer plugin that works. However, as the plugin code lives in a namespace this is displayed in when Qt Designer is run. I read about the 'displayname' attribute that can be set in the domXml method. When I use it, however, my custom widget doe not show up in Qt Designer Here is my domXml method - return ui language=\c++\ displayname=\Button Lable\\n widget class=\ButtonLabel\ name=\buttonLabel\ \n property name=\geometry\\n rect\n x0/x\n y0/y\n width131/width\n height121/height\n /rect\n /property\n /widget\n; Has anyone any advice on how I can get his to work Thanks ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Qt Designer Plugin
DOH It seems that I forgot to close the xml tags correctly -Original Message- From: interest-bounces+graham.labdon=avalonsciences@qt-project.org [mailto:interest-bounces+graham.labdon=avalonsciences@qt-project.org] On Behalf Of Graham Labdon Sent: 06 August 2014 08:47 To: Interest@qt-project.org Subject: [Interest] Qt Designer Plugin Hi I have developed a Qt Designer plugin that works. However, as the plugin code lives in a namespace this is displayed in when Qt Designer is run. I read about the 'displayname' attribute that can be set in the domXml method. When I use it, however, my custom widget doe not show up in Qt Designer Here is my domXml method - return ui language=\c++\ displayname=\Button Lable\\n widget class=\ButtonLabel\ name=\buttonLabel\ \n property name=\geometry\\n rect\n x0/x\n y0/y\n width131/width\n height121/height\n /rect\n /property\n /widget\n; Has anyone any advice on how I can get his to work 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] Tabbed Dock Widgets
Hi In my application I have a set of docked widgets that are all tabbed. I have a menu to which I have added the action associated with the docked widget that enables me to toggle the viability of the widgets. This all works fine except for one niggle. Say I have 2 out of 3 of my widgets on display and then use the menu to make a 3rd visible. The 3rd widget does get added to the tabbed set of widgets but is not made the current tab. Does anyone have any hints on how I can make it the current tab Thanks ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Tabbed Dock Widgets
Hi I realise that but I cannot get a handle for the docked widget -Original Message- From: interest-bounces+graham.labdon=avalonsciences@qt-project.org [mailto:interest-bounces+graham.labdon=avalonsciences@qt-project.org] On Behalf Of Ben Swerts Sent: 24 July 2014 14:17 To: interest@qt-project.org Subject: Re: [Interest] Tabbed Dock Widgets Hi Graham, Calling raise() on the QDockWidget should do it. Greets, Ben -Original Message- From: interest-bounces+benswerts=telenet...@qt-project.org [mailto:interest-bounces+benswerts=telenet...@qt-project.org] On Behalf Of Graham Labdon Sent: Thursday, July 24, 2014 12:29 To: interest@qt-project.org Subject: [Interest] Tabbed Dock Widgets Hi In my application I have a set of docked widgets that are all tabbed. I have a menu to which I have added the action associated with the docked widget that enables me to toggle the viability of the widgets. This all works fine except for one niggle. Say I have 2 out of 3 of my widgets on display and then use the menu to make a 3rd visible. The 3rd widget does get added to the tabbed set of widgets but is not made the current tab. Does anyone have any hints on how I can make it the current tab 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
Re: [Interest] Application Plugins
Hi thanks for your reply I have stepped through the code with the debugger and it reports that the specified module could not be found This project succeeds if compiled in Release mode but not in Debug mode Does anyone have clue about this? Thanks -Original Message- From: interest-bounces+graham.labdon=avalonsciences@qt-project.org [mailto:interest-bounces+graham.labdon=avalonsciences@qt-project.org] On Behalf Of Bo Thorsen Sent: 23 July 2014 09:22 To: interest@qt-project.org Subject: Re: [Interest] Application Plugins Den 22-07-2014 17:09, Graham Labdon skrev: Hi I am developing a set of plugins for my Qt application using VS 2012 When I created the project I selected Qt Library as the project type, but when I load the library with QPluginLoader the 'instance' method failed. I then created another VS project using the 'Qt Application' as the project type and deleted main.cpp and using the VS properties manager I set the configuration type to Dynamic library, Using this method the plugin is loaded and behaves as expected. I have compared the VS configuration properties and they are identical. I have created a .pro file for both projects using VS and they are also identical. I would be grateful if you could tell me the reason for this The only way I have found that it's possible to debug this is to singlestep through the Qt plugin loader code. One problem that I've seen multiple times in the Qt 4 (don't know if this is fixed in 5) is that if I have run the application in debug mode, the plugin system stores a list of known plugins in the config. So when I switched to debug, it still tries to load the debug plugin and that won't work. After deleting the file with the cache list, I could load the plugin. Sorry that I can't be of more help. Fire up the debugger :( Bo. -- Viking Software Qt and C++ developers for hire http://www.vikingsoft.eu ___ 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] Application Plugins
Hi It turns out that it was a dependency problem Thanks for your help -Original Message- From: interest-bounces+graham.labdon=avalonsciences@qt-project.org [mailto:interest-bounces+graham.labdon=avalonsciences@qt-project.org] On Behalf Of alexander golks Sent: 23 July 2014 10:38 Cc: interest@qt-project.org Subject: Re: [Interest] Application Plugins Am Wed, 23 Jul 2014 09:05:45 + schrieb Graham Labdon graham.lab...@avalonsciences.com: Hi thanks for your reply I have stepped through the code with the debugger and it reports that the specified module could not be found This project succeeds if compiled in Release mode but not in Debug mode Does anyone have clue about this? i would check for dependency problems of the resulting dll. further on: thats why we have debug plugins with d appended, just like qt does, for not trying to load debug in release and vice versa. perhaps this is still your problem? alex -- /* *printk (KERN_ERR %s: Oops - your private data area is hosed!\n, ...) *linux-2.6.6/drivers/net/ewrk3.c */ ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
[Interest] Application Plugins
Hi I am developing a set of plugins for my Qt application using VS 2012 When I created the project I selected Qt Library as the project type, but when I load the library with QPluginLoader the 'instance' method failed. I then created another VS project using the 'Qt Application' as the project type and deleted main.cpp and using the VS properties manager I set the configuration type to Dynamic library, Using this method the plugin is loaded and behaves as expected. I have compared the VS configuration properties and they are identical. I have created a .pro file for both projects using VS and they are also identical. I would be grateful if you could tell me the reason for this Thanks ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
[Interest] Tabbed Dock Widgets
Hi I have an application with a couple of dock widgets and have used tabifyDockWidget to have them show up as tabbed dock widgets. I have set the allowed areas for both to be Qt:: BottomDockWidgetArea and both are floatable. Now when I float one of the dock widgets I am able to redock it to bottom dock widget area or to redock it as a tabbed widget. What I would like to achieve is for the user to ONLY be able to redock a floated widget as a tabbed widget. Has anyone done this before? Is it even possible? Thanks for your time ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
[Interest] Dock WIdgets
Hi I am investigating the behaviour of dock widgets. I am trying to achieve the following - 1. Have a set of tabbed dock widgets positioned at the bottom of mainWindow 2. Have each of the tabbed dock widgets floatable but not moveable 3. Have the dock widgets always take up the entire space of the mainWindow 1 2 are easy to implement but I am struggling with 3. Does anyone have any hints on how I can achieve this. Thanks ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] QFileSystemWatcher
Thanks for the info -Original Message- From: interest-bounces+graham.labdon=avalonsciences@qt-project.org [mailto:interest-bounces+graham.labdon=avalonsciences@qt-project.org] On Behalf Of Koehne Kai Sent: 01 April 2014 11:24 To: Koehne Kai; sarah jones; interest@qt-project.org Subject: Re: [Interest] QFileSystemWatcher (bringing this back to interest@ ...) -Original Message- From: sarah jones [mailto:qtsa...@outlook.com] Sent: Tuesday, April 01, 2014 12:13 PM To: Koehne Kai Subject: RE: [Interest] QFileSystemWatcher Hi I am using Qt5.2.1 on Windows 7 I think that the problem may lie in how I am testing this. I have a separate program that copies files from one folder to another (executed in a thread) If I replace this program with a simple batch file things seem to be improved. But i don't know how or why - is there some kind of interaction between the test program and the FileSystemWatcher Confused One theory: Your application gets so many QFileSystemWatcher events that the event loop saturates. Robin Burchell blogged about QFileSystemWatcher changes in Qt 5, and mentions (one variant of) this problem as solved, but later on mentions on Windows it still uses threads: http://blog.rburchell.com/2012/01/qfilesystemwatcher-internals-in-qt-5.html Regards Kai ___ 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] QCompleter
Hi I am trying to get QCompleter to behave as follows - complete folder names but only show files with a given extension So for example C:\ - user sees all folders under C C:\my - user sees all folders that match C:\myFolder\a - user sees all folders that match + any files that match a*.myext I have played with the various options in QDirModel and QFileSystemModel but cannot find the correct combination. Is this possible with QCompleter as it is or do I need to derive from it to get some extra functionality? Thanks ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
[Interest] understanding QCompleter
Hi Please help to understand QCompleter Here is the code used to set up the completer m_completer = new QCompleter(this); m_fileSystemModel = new QFileSystemModel(m_completer); m_fileSystemModel-setRootPath(); m_completer-setModel(m_fileSystemModel); m_completer-setCompletionMode(QCompleter::PopupCompletion); m_completer-setMaxVisibleItems(10); m_completer-setWrapAround(true); ui.lineEdit-setCompleter(m_completer); When I run this I seem to get inconsistent behaviour At time the completion popup is not displayed Is there anything obviously wrong with my code or has anyone else any ideas as to why this happens I have built the completer example supplied by Qt and the same behaviour happens ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
[Interest] efficient drawing advice
Hi My application needs to display a series of 'traces'. Each trace will consist of 5000+ points and there can be up to 50 traces. I would be grateful of some pointers on how to do this in the most efficient way - QPainter on a widget Use of OpenGL QGraphicsScene Which of these will be the most efficient at displaying the data quickly? Thanks for your time ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
[Interest] QThread
Hi I am experimenting with QThreads The basic idea is to have a thread performing some task and to have a button on the UI that can stop this operation So I have a class that will perform the operation called GeneratorThread that has a start slot In the main ui class I create an instance of the class - m_generatorThread = new GeneratorThread(this); Then I call moveToThread and make the connections- m_generatorThread-moveToThread(m_thread) connect(m_thread,QThread::started,m_generatorThread, GeneratorThread::start); connect(m_generatorThread,GeneratorThread::finished,m_thread,QThread::quit); connect(m_generatorThread,GeneratorThread::finished,m_generatorThread,GeneratorThread::deleteLater); connect(m_thread,QThread::finished,m_generatorThread,GeneratorThread::deleteLater); And finally I start the thread m_thread-start() The generatorThread simply writes a debug message every second and I see this happening. The problem is that my ui does not respond to any input - so my stop button will not work I am obviously doing something wrong and would appreciate any help Thanks ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] QThread
Thanks for that - my ui is now responsive What is the correct way to stop my thread running? I tried m_thread-exit() but it still continues Thanks again -Original Message- From: interest-bounces+graham.labdon=avalonsciences@qt-project.org [mailto:interest-bounces+graham.labdon=avalonsciences@qt-project.org] On Behalf Of André Somers Sent: 24 March 2014 12:06 To: interest@qt-project.org Subject: Re: [Interest] QThread Graham Labdon schreef op 24-3-2014 12:38: Hi I am experimenting with QThreads The basic idea is to have a thread performing some task and to have a button on the UI that can stop this operation So I have a class that will perform the operation called GeneratorThread that has a start slot In the main ui class I create an instance of the class - m_generatorThread = new GeneratorThread(this); Then I call moveToThread and make the connections- m_generatorThread-moveToThread(m_thread) connect(m_thread,QThread::started,m_generatorThread, GeneratorThread::start); connect(m_generatorThread,GeneratorThread::finished,m_thread,QThread ::quit); connect(m_generatorThread,GeneratorThread::finished,m_generatorThread ,GeneratorThread::deleteLater); connect(m_thread,QThread::finished,m_generatorThread,GeneratorThread ::deleteLater); And finally I start the thread m_thread-start() The generatorThread simply writes a debug message every second and I see this happening. The problem is that my ui does not respond to any input - so my stop button will not work I am obviously doing something wrong and would appreciate any help Yeah, you are doing some things wrong. Your moveToThread will fail, because GeneratorThread (confusing name for what seems to be a worker class?) has a parent. That causes that your worker is not in a different thread at all, but blocking your main thread instead. André ___ 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] QThread
Thanks all -Original Message- From: interest-bounces+graham.labdon=avalonsciences@qt-project.org [mailto:interest-bounces+graham.labdon=avalonsciences@qt-project.org] On Behalf Of André Somers Sent: 24 March 2014 12:40 To: interest@qt-project.org Subject: Re: [Interest] QThread william.croc...@analog.com schreef op 24-3-2014 13:34: On 03/24/2014 08:10 AM, Graham Labdon wrote: Thanks for that - my ui is now responsive What is the correct way to stop my thread running? I tried m_thread-exit() but it still continues Have it periodically check a global, (mutex-protected?) variable and then terminate (by returning from the run() function) voluntarily. Protecting it with a mutex is usually not needed, and it doesn't need to be global either. However, you may want to use a QAtomicInt or a volatile bool as your flag type, and you can make that a member variable of your worker class that can be set with a simple method call. André Thanks again -Original Message- From: interest-bounces+graham.labdon=avalonsciences@qt-project.org [mailto:interest-bounces+graham.labdon=avalonsciences.com@qt-project. org] On Behalf Of André Somers Sent: 24 March 2014 12:06 To: interest@qt-project.org Subject: Re: [Interest] QThread Graham Labdon schreef op 24-3-2014 12:38: Hi I am experimenting with QThreads The basic idea is to have a thread performing some task and to have a button on the UI that can stop this operation So I have a class that will perform the operation called GeneratorThread that has a start slot In the main ui class I create an instance of the class - m_generatorThread = new GeneratorThread(this); Then I call moveToThread and make the connections- m_generatorThread-moveToThread(m_thread) connect(m_thread,QThread::started,m_generatorThread, GeneratorThread::start); connect(m_generatorThread,GeneratorThread::finished,m_thread,QThre ad ::quit); connect(m_generatorThread,GeneratorThread::finished,m_generatorThre ad ,GeneratorThread::deleteLater); connect(m_thread,QThread::finished,m_generatorThread,GeneratorThre ad ::deleteLater); And finally I start the thread m_thread-start() The generatorThread simply writes a debug message every second and I see this happening. The problem is that my ui does not respond to any input - so my stop button will not work I am obviously doing something wrong and would appreciate any help Yeah, you are doing some things wrong. Your moveToThread will fail, because GeneratorThread (confusing name for what seems to be a worker class?) has a parent. That causes that your worker is not in a different thread at all, but blocking your main thread instead. André ___ 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 ___ 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] QDialog + DialogCode
Hi I have just started to use Qt 5.2.1 and have run into a problem with this code - MyDialog d; if (d.exec() == QDialog::Accepted) { } This is because in QDialog the DialogCode enum has been made private Does anyone know if this was intentional or a bug? If it was intentional how is the return value supposed to be checked? Thanks ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] QDialog + DialogCode
Hi My bad inclusion error -Original Message- From: interest-bounces+graham.labdon=avalonsciences@qt-project.org [mailto:interest-bounces+graham.labdon=avalonsciences@qt-project.org] On Behalf Of Graham Labdon Sent: 07 March 2014 14:43 To: Interest@qt-project.org Subject: [Interest] QDialog + DialogCode Hi I have just started to use Qt 5.2.1 and have run into a problem with this code - MyDialog d; if (d.exec() == QDialog::Accepted) { } This is because in QDialog the DialogCode enum has been made private Does anyone know if this was intentional or a bug? If it was intentional how is the return value supposed to be checked? 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] QTreeView and context menu
Hi I have developed a class derived from QAbstractItemModel and am using it to display data in a QTreeView. I want to display a context menu when the user right clicks on an item in the tree. The contents of this menu are dependent on which item in the tree has bee clicked and the result of the click will result in an additional row being inserted into the model. I would be grateful of some guidance of how to achieve this. Thanks ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] QTreeView and context menu
Thanks for the hints From: Clément Geiger [mailto:clement.gei...@gmail.com] Sent: 27 February 2014 13:57 To: Graham Labdon Cc: Interest@qt-project.org Subject: Re: [Interest] QTreeView and context menu Hello Graham, You can use the contextMenuPolicy Qt::CustomContextMenu. In that case, when your QTreeView receives a right-click, it sends a signal contextMenuRequested(QPoint) that you can connect to a slot. In that slot, you are able to know which item has been clicked through QTreeView::indexAt(QPoint). You can then compose your context menu (use QMenu) as needed, and show it with QMenu::exec(). If you already subclassed QTreeView for a reason or another, there is another way: leave the contextMenuPolicy as is and reimplement the contextMenuEvent method. From there on it's the same as with the 1st method (retrieve clicked index, compose menu and execute it). Cheers Clément 2014-02-27 9:09 GMT+01:00 Graham Labdon graham.lab...@avalonsciences.commailto:graham.lab...@avalonsciences.com: Hi I have developed a class derived from QAbstractItemModel and am using it to display data in a QTreeView. I want to display a context menu when the user right clicks on an item in the tree. The contents of this menu are dependent on which item in the tree has bee clicked and the result of the click will result in an additional row being inserted into the model. I would be grateful of some guidance of how to achieve this. Thanks ___ Interest mailing list Interest@qt-project.orgmailto: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] QtProperty System
Hi I have been reading about Qt's property system, in particular the NOTIFY optional specifier. Can NOTIFY be used with non Qml/QtQuick applications? Thanks ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
[Interest] Adding a QStyledDelegate to a tree view
Hi I have a tree view that renders data contained in a class derived from QAbstractItemView, now I want to add a QStyledItemDelegate. So I call m_treeView-setItemDelegate(new SessionStyledDelegate(this)); But none of the methods in my delegate get called. Is there anything else that I need to do? ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] QtProperty System
Ok Thanks -Original Message- From: Bo Thorsen [mailto:bthor...@ics.com] Sent: 21 February 2014 11:33 To: Graham Labdon; Interest@qt-project.org Subject: Re: [Interest] QtProperty System Den 21-02-2014 09:01, Graham Labdon skrev: Hi I have been reading about Qt's property system, in particular the NOTIFY optional specifier. Can NOTIFY be used with non Qml/QtQuick applications? You can, but it doesn't do anything unless you code this yourself. The NOTIFY just tells the introspection what signal is used to notify changes. Unless you use this information for something yourself, it is useless. QML uses this to update the bindings. You can do something similar yourself. Bo. -- Bo Thorsen, European Engineering Manager, ICS Meet me at our quickstarts across Europe in March. London, Copenhagen, Hamburg, Munich and Zurich. See this page: http://ics.com/qt-quickstart ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Adding a QStyledDelegate to a tree view
Ahh that was it Thanks -Original Message- From: interest-bounces+graham.labdon=avalonsciences@qt-project.org [mailto:interest-bounces+graham.labdon=avalonsciences@qt-project.org] On Behalf Of André Somers Sent: 21 February 2014 12:13 To: interest@qt-project.org Subject: Re: [Interest] Adding a QStyledDelegate to a tree view Graham Labdon schreef op 21-2-2014 12:51: Hi I have a tree view that renders data contained in a class derived from QAbstractItemView, now I want to add a QStyledItemDelegate. So I call m_treeView-setItemDelegate(new SessionStyledDelegate(this)); But none of the methods in my delegate get called. Is there anything else that I need to do? ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest Are you use that you got the signatures of the methods you reimplemented correct, including const-ness? André ___ 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] QMetaType::metaObjectForType
Hi I am trying to use QMetaType::metaObjectForType but it is always returning NULL I have attached my class declaration and would be grateful if anyone can explain why I am getting a NULL return value Many thanks Class.h - class Widget : public QWidget { Q_OBJECT public: Q_INVOKABLE Widget(QWidget *parent=0); Widget(const Widget other); ~Widget(); }; Q_DECLARE_METATYPE(Widget) Class.cpp const int WidgetTypeID = qRegisterMetaTypeWidget(Widget); Widget::Widget(QWidget *parent) : QWidget(parent) { } Widget::~Widget() { } Widget::Widget(const Widget other) { Q_UNUSED(other) } Usage int id = QMetaType::type(Widget); const QMetaObject* baseMetaObject = QMetaType::metaObjectForType(id); ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] QMetaType::metaObjectForType
Hi Thanks for your quick reply. This does indeed work, but I would be grateful if you could explain why Thanks -Original Message- From: interest-bounces+graham.labdon=avalonsciences@qt-project.org [mailto:interest-bounces+graham.labdon=avalonsciences@qt-project.org] On Behalf Of Stephen Kelly Sent: 17 February 2014 09:41 To: interest@qt-project.org Subject: Re: [Interest] QMetaType::metaObjectForType On Monday, February 17, 2014 09:37:00 Graham Labdon wrote: Hi I am trying to use QMetaType::metaObjectForType but it is always returning NULL I have attached my class declaration and would be grateful if anyone can explain why I am getting a NULL return value Many thanks metatype.txt metatype.txt Class.h - class Widget : public QWidget { Q_OBJECT public: Q_INVOKABLE Widget(QWidget *parent=0); Widget(const Widget other); ~Widget(); }; Q_DECLARE_METATYPE(Widget) Remove this line. Class.cpp const int WidgetTypeID = qRegisterMetaTypeWidget(Widget); Register the pointer. Don't specify the string: qRegisterMetaTypeWidget*(); Most likely you should move this from global scope to your usage section. Usage int id = QMetaType::type(Widget); int id = QMetaType::type(Widget*); Thanks, -- Stephen Kelly stephen.ke...@kdab.com | Software Engineer KDAB (Deutschland) GmbH Co.KG, a KDAB Group Company www.kdab.com || Germany +49-30-521325470 || Sweden (HQ) +46-563-540090 KDAB - Qt Experts - Platform-Independent Software Solutions ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] QMetaType::metaObjectForType
Thanks! -Original Message- From: Stephen Kelly [mailto:stephen.ke...@kdab.com] Sent: 17 February 2014 10:06 To: Graham Labdon Cc: interest@qt-project.org Subject: Re: [Interest] QMetaType::metaObjectForType On Monday, February 17, 2014 09:47:20 you wrote: Hi Thanks for your quick reply. This does indeed work, but I would be grateful if you could explain why Q_DECLARE_METATYPE(Widget) Remove this line. You don't pass around copies of QObject derived types because it is not copyable. You pass around pointers instead. So, you don't want 'Widget' to be a metatype, you want 'Widget*' to be a metatype so that you can put a Widget* in a QVariant for example. You can use Q_DECLARE_METATYPE(Widget*) but it is not needed as of Qt 5.0. There's some background info here: http://steveire.wordpress.com/2011/03/16/implementing-qvariantqmetatype-features-with-template-tricks/ and the problems were solved and implemented in 5.0 http://www.kdab.com/kdab-contributions-to-qt-5-0-part-1/ So, it's better to remove the Q_DECLARE_METATYPE that you don't need rather than add one that is wrong. Class.cpp const int WidgetTypeID = qRegisterMetaTypeWidget(Widget); Register the pointer. Don't specify the string: qRegisterMetaTypeWidget*(); By using a string there, you run the risk of typos. The string is not needed and should not be used (even with Qt 4 code). Thanks, -- Stephen Kelly stephen.ke...@kdab.com | Software Engineer KDAB (Deutschland) GmbH Co.KG, a KDAB Group Company www.kdab.com || Germany +49-30-521325470 || Sweden (HQ) +46-563-540090 KDAB - Qt Experts - Platform-Independent Software Solutions ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] metaObject from class name
Ok Thanks From: Keith Gardner [mailto:kreios4...@gmail.com] Sent: 14 February 2014 15:21 To: Jason H Cc: Graham Labdon; interest@qt-project.org Subject: Re: [Interest] metaObject from class name If you register the class with QMetaType with Q_DECLARE_METATYPE(Class*), you can then call QMetaType::type(Class). With the returned int, you can then call QMetaType::metaObjectForType(integer). I think this is what you are looking for. class Foo : public QObject { ... }; Q_DECLARE_METATYPE(Foo*) const char *string = Foo; const QMetaObject* metaObject = QMetaType::metaObjectForType(QMetaType::type(string)); I haven't tried compiling this but I believe this is how it will work based off of the docs for QMetaType. Keith On Fri, Feb 14, 2014 at 9:14 AM, Jason H scorp...@yahoo.commailto:scorp...@yahoo.com wrote: I'm not 10% udnerstanding your intentions, but this might help. You can create any QObject through QMetaObject by the class name, then get the meta object for the created object. Look at QMetaObject::newInstance(..) You need a class factory design pattern. Here is an example: http://www.ics.com/designpatterns/solutions/abstractfactory.html#abstractfactoryh From: Graham Labdon graham.lab...@avalonsciences.commailto:graham.lab...@avalonsciences.com To: interest@qt-project.orgmailto:interest@qt-project.org interest@qt-project.orgmailto:interest@qt-project.org Sent: Friday, February 14, 2014 5:50 AM Subject: [Interest] metaObject from class name Hi In my application I have a class name as a string This is the name of a class derived from QObject. Now what I would like to do is the get metaObject for this class from the string Is this at all possible? Many thanks ___ Interest mailing list Interest@qt-project.orgmailto:Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest ___ Interest mailing list Interest@qt-project.orgmailto: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] QAbstractItemModel
Hi I have just started with QAbstractItemModel and have some doubts as to whether I am doing things in the correct way. I have class that (amongst other things) is storing a set of data that I want to display in a QTreeView. So I made a model class derived from QAbstractItemModel and have then attached this model to my QTreeView which does show the data correctly and allows the user to edit the values. As expected when an edit is completed my setData method gets called and I can set the relevant items data. However, this does not update the underlying data and I am struggling to see how this is done. I would be grateful if someone could a) confirm that I am doing things correctly b) explain how the underlying data is typically updated Thanks ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] QtThread
Thanks everyone I am beginning to understand -Original Message- From: interest-bounces+graham.labdon=avalonsciences@qt-project.org [mailto:interest-bounces+graham.labdon=avalonsciences@qt-project.org] On Behalf Of Sze Howe Koh Sent: 13 January 2014 15:27 To: interest@qt-project.org Subject: Re: [Interest] QtThread On 13 January 2014 18:26, Etienne Sandré-Chardonnal etienne.san...@m4x.org wrote: Hi, As Andrey pointed out, there is not a single way. But if you want to use a QThread for running QObjects with its event loop, the most simple way is not to subclass, and moveToThread. This is well explained here: http://blog.qt.digia.com/blog/2010/06/17/youre-doing-it-wrong/ http://mayaposch.wordpress.com/2011/11/01/how-to-really-truly-use-qthr eads-the-full-explanation/ To balance things out, here's a direct response to Etienne's first link: http://woboq.com/blog/qthread-you-were-not-doing-so-wrong.html The correct method depends on what you want to achieve. I wrote (most of) this page to compare/contrast all the different ways to do parallel processing in Qt, and try to help readers choose the best way for their application: http://qt-project.org/doc/qt-5/threads-technologies.html (suggestions for improvements are welcome!) Regards, Sze-Howe ___ 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] QtThread
Hi I have been reading about QtThread and there seems to be a lot of discussion about how to correctly use this class. i.e. should developers derive from QtThread or provide an QObject and move this object to a thread. The examples provided with Qt5 derive from QtThread whereas there is a lot of chatter on the web saying this is not the correct way. Can anyone provide some definitive answers on how developers are to use QtThread? Thanks ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
[Interest] QFileSystemWatcher - possible bug
Hi I have added a path to a QFileSystemWatcher object to detect when a folder is added to an initial folder. I have connected the directoryChanged signal and indeed this gets called when a folder is added to the initial folder. now want to add a watch for the added folder so in my slot I get a list of folders in the initial folder - QDir rootDir(m_rootFolderPathname); QFileInfoList listing = rootDir.entryInfoList(QDir::Dirs,QDir::Name); and add the last entry as a slot m_fileSystemWatcher-addPath(listing.last().absoluteFilePath()); I have tested this under various circumstances and the add path sometimes fails. In particular, if I use windows explorer to copy an (empty) folder into to initial folder it will always fail even though the QFileInfoList says that the folder exists. Running the program through the debugger - it never fails If I set the initial folder to point at a folder on a neworked drive of a pen drive the call to addPath never fails. If a use another program to copy a folder into the initial folder, once again everything is as expected. I am guessing that QFileSystemWatcher does not find the new folder for some reason, even though QDir does find it. Is this a bug or just an operating system issue? ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
[Interest] cannot find entry point
Hi I am working in a development team of 4 engineers and we each have the same development environment- VS2012 Qt5.1.1 Windows 7 If one of us compiles an application and then copies the executable to another's machine it will not run. It complains about not being able to find entry points in the Qt Dlls even though the DLLs are identical. If the DLL from machine 1 is copied to machine 2 the program will run. I would be grateful if anyone has any ideas on what might be the cause of this. Thanks ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] cannot find entry point
Hi Just discovered it was a windows path issue!! DOH From: interest-bounces+graham.labdon=avalonsciences@qt-project.org [mailto:interest-bounces+graham.labdon=avalonsciences@qt-project.org] On Behalf Of Graham Labdon Sent: 10 December 2013 14:19 To: interest@qt-project.org Subject: [Interest] cannot find entry point Hi I am working in a development team of 4 engineers and we each have the same development environment- VS2012 Qt5.1.1 Windows 7 If one of us compiles an application and then copies the executable to another's machine it will not run. It complains about not being able to find entry points in the Qt Dlls even though the DLLs are identical. If the DLL from machine 1 is copied to machine 2 the program will run. I would be grateful if anyone has any ideas on what might be the cause of this. Thanks ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
[Interest] using designer plugin in application
Hi I have developed a number of Qt Designer plugins and can use them in my applications. But obviously I need my apps to link against the plugin library which means when I deploy the application I need to deploy the plugin library as well. What I would like is for widget classes to be compiled into one library that both the application and the designer plugin can use but I have been unable to achieve this. Is this possible? ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] using designer plugin in application
Hi I have read this but cannot get it to work (I am using Qt5.1.1 with Visual Studio I have a library called Widgets.dll that contains 1 class declared as #include QLabel #include widgets_global.h class WIDGETS_EXPORT MyLabel : public QLabel { Q_OBJECT public: MyLabel(QWidget *parent); ~MyLabel(); private: }; I have set up my plugin project so that it can see the header file for MyLabel and can see the Widgets.lib The plugin project builds without error but is not visible in Designer Can anyone see the reason for this? Thanks From: Harish Surana [mailto:suran...@gmail.com] Sent: 03 December 2013 10:20 To: Graham Labdon Cc: interest@qt-project.org Subject: Re: [Interest] using designer plugin in application Yes it is technically possible to make the widgets accessible to Qt Designer without linking widgets dll against QtDesigner4.dll. Some possible approaches are described here: http://qt-project.org/doc/qt-4.8/designer-creating-custom-widgets.html (see the section Splitting up the Plugin). On Tue, Dec 3, 2013 at 10:31 AM, Graham Labdon graham.lab...@avalonsciences.commailto:graham.lab...@avalonsciences.com wrote: Hi I have developed a number of Qt Designer plugins and can use them in my applications. But obviously I need my apps to link against the plugin library which means when I deploy the application I need to deploy the plugin library as well. What I would like is for widget classes to be compiled into one library that both the application and the designer plugin can use but I have been unable to achieve this. Is this possible? ___ Interest mailing list Interest@qt-project.orgmailto: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] using designer plugin in application
So I added the export and includes QDesignerExportWidget to my class and now it wont compile - Moc'ing MyLabel.h... 1 moc_MyLabel.cpp 1Build\moc\moc_MyLabel.cpp(55): warning C4273: 'MyLabel::qt_static_metacall' : inconsistent dll linkage 1 c:\sandbox\testplugin\widgets\build\moc\../../MyLabel.h(10) : see previous definition of 'qt_static_metacall' 1Build\moc\moc_MyLabel.cpp(62): warning C4273: 'staticMetaObject' : inconsistent dll linkage 1 c:\sandbox\testplugin\widgets\build\moc\../../MyLabel.h(10) : see previous definition of 'public: static QMetaObject const MyLabel::staticMetaObject' 1Build\moc\moc_MyLabel.cpp(62): error C2491: 'MyLabel::staticMetaObject' : definition of dllimport static data member not allowed 1Build\ . I have no idea why From: Harish Surana [mailto:suran...@gmail.com] Sent: 03 December 2013 11:13 To: Graham Labdon Cc: interest@qt-project.org Subject: Re: [Interest] using designer plugin in application If you look for QDESIGNER_WIDGET_EXPORT in the documentation. You will get: QDESIGNER_WIDGET_EXPORT This macro is used when defining custom widgets to ensure that they are correctly exported from plugins for use with Qt Designer. On some platforms, the symbols required by Qt Designer to create new widgets are removed from plugins by the build system, making them unusable. Using this macro ensures that the symbols are retained on those platforms, and has no side effects on other platforms. For example, the World Time Clock Pluginqthelp://com.trolltech.qt.484/qdoc/designer-worldtimeclockplugin.html example exports a custom widget class with the following declaration: class QDESIGNER_WIDGET_EXPORT WorldTimeClock : public QWidgetqthelp://com.trolltech.qt.484/qdoc/qwidget.html { Q_OBJECT ... }; On Tue, Dec 3, 2013 at 12:00 PM, Graham Labdon graham.lab...@avalonsciences.commailto:graham.lab...@avalonsciences.com wrote: Hi I have read this but cannot get it to work (I am using Qt5.1.1 with Visual Studio I have a library called Widgets.dll that contains 1 class declared as #include QLabel #include widgets_global.h class WIDGETS_EXPORT MyLabel : public QLabel { Q_OBJECT public: MyLabel(QWidget *parent); ~MyLabel(); private: }; I have set up my plugin project so that it can see the header file for MyLabel and can see the Widgets.lib The plugin project builds without error but is not visible in Designer Can anyone see the reason for this? Thanks From: Harish Surana [mailto:suran...@gmail.commailto:suran...@gmail.com] Sent: 03 December 2013 10:20 To: Graham Labdon Cc: interest@qt-project.orgmailto:interest@qt-project.org Subject: Re: [Interest] using designer plugin in application Yes it is technically possible to make the widgets accessible to Qt Designer without linking widgets dll against QtDesigner4.dll. Some possible approaches are described here: http://qt-project.org/doc/qt-4.8/designer-creating-custom-widgets.html (see the section Splitting up the Plugin). On Tue, Dec 3, 2013 at 10:31 AM, Graham Labdon graham.lab...@avalonsciences.commailto:graham.lab...@avalonsciences.com wrote: Hi I have developed a number of Qt Designer plugins and can use them in my applications. But obviously I need my apps to link against the plugin library which means when I deploy the application I need to deploy the plugin library as well. What I would like is for widget classes to be compiled into one library that both the application and the designer plugin can use but I have been unable to achieve this. Is this possible? ___ Interest mailing list Interest@qt-project.orgmailto: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] using designer plugin in application
Hi I have the answer for making this work with Visual Studio In Widget.dll I have MyLabel.h and MyLabel.cpp In this project I set the pre-processor directive QDESIGNER_EXPORT_WIDGETS MyLabel is declared as class QDESIGNER_WIDGET_EXPORT MyLabel : public QLabel ... In the plugin project I add MyLabel.cpp and MyLabel.h as existing items and build Thanks for your input From: Harish Surana [mailto:suran...@gmail.com] Sent: 03 December 2013 11:42 To: Graham Labdon Cc: interest@qt-project.org Subject: Re: [Interest] using designer plugin in application I would say first try to run this example http://qt-project.org/doc/qt-4.8/designer-customwidgetplugin.html and then compare with your implementation. On Tue, Dec 3, 2013 at 12:24 PM, Graham Labdon graham.lab...@avalonsciences.commailto:graham.lab...@avalonsciences.com wrote: So I added the export and includes QDesignerExportWidget to my class and now it wont compile - Moc'ing MyLabel.h... 1 moc_MyLabel.cpp 1Build\moc\moc_MyLabel.cpp(55): warning C4273: 'MyLabel::qt_static_metacall' : inconsistent dll linkage 1 c:\sandbox\testplugin\widgets\build\moc\../../MyLabel.h(10) : see previous definition of 'qt_static_metacall' 1Build\moc\moc_MyLabel.cpp(62): warning C4273: 'staticMetaObject' : inconsistent dll linkage 1 c:\sandbox\testplugin\widgets\build\moc\../../MyLabel.h(10) : see previous definition of 'public: static QMetaObject const MyLabel::staticMetaObject' 1Build\moc\moc_MyLabel.cpp(62): error C2491: 'MyLabel::staticMetaObject' : definition of dllimport static data member not allowed 1Build\ . I have no idea why From: Harish Surana [mailto:suran...@gmail.commailto:suran...@gmail.com] Sent: 03 December 2013 11:13 To: Graham Labdon Cc: interest@qt-project.orgmailto:interest@qt-project.org Subject: Re: [Interest] using designer plugin in application If you look for QDESIGNER_WIDGET_EXPORT in the documentation. You will get: QDESIGNER_WIDGET_EXPORT This macro is used when defining custom widgets to ensure that they are correctly exported from plugins for use with Qt Designer. On some platforms, the symbols required by Qt Designer to create new widgets are removed from plugins by the build system, making them unusable. Using this macro ensures that the symbols are retained on those platforms, and has no side effects on other platforms. For example, the World Time Clock Plugin example exports a custom widget class with the following declaration: class QDESIGNER_WIDGET_EXPORT WorldTimeClock : public QWidget { Q_OBJECT ... }; On Tue, Dec 3, 2013 at 12:00 PM, Graham Labdon graham.lab...@avalonsciences.commailto:graham.lab...@avalonsciences.com wrote: Hi I have read this but cannot get it to work (I am using Qt5.1.1 with Visual Studio I have a library called Widgets.dll that contains 1 class declared as #include QLabel #include widgets_global.h class WIDGETS_EXPORT MyLabel : public QLabel { Q_OBJECT public: MyLabel(QWidget *parent); ~MyLabel(); private: }; I have set up my plugin project so that it can see the header file for MyLabel and can see the Widgets.lib The plugin project builds without error but is not visible in Designer Can anyone see the reason for this? Thanks From: Harish Surana [mailto:suran...@gmail.commailto:suran...@gmail.com] Sent: 03 December 2013 10:20 To: Graham Labdon Cc: interest@qt-project.orgmailto:interest@qt-project.org Subject: Re: [Interest] using designer plugin in application Yes it is technically possible to make the widgets accessible to Qt Designer without linking widgets dll against QtDesigner4.dll. Some possible approaches are described here: http://qt-project.org/doc/qt-4.8/designer-creating-custom-widgets.html (see the section Splitting up the Plugin). On Tue, Dec 3, 2013 at 10:31 AM, Graham Labdon graham.lab...@avalonsciences.commailto:graham.lab...@avalonsciences.com wrote: Hi I have developed a number of Qt Designer plugins and can use them in my applications. But obviously I need my apps to link against the plugin library which means when I deploy the application I need to deploy the plugin library as well. What I would like is for widget classes to be compiled into one library that both the application and the designer plugin can use but I have been unable to achieve this. Is this possible? ___ Interest mailing list Interest@qt-project.orgmailto: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 Designer plugins
Hi I am trying to make a library with several Qt Designer plugins following the instructions here http://qt-project.org/doc/qt-5.0/qtdesigner/qdesignercustomwidgetcollectioninterface.html When compiling I am getting this error - mycustomwidgets.cpp(17): error C2338: Old plugin system used 1mycustomwidgets.cpp(18): fatal error C1004: unexpected end-of-file found Can anyone please explain the reason for this and what I need to do to fix it Thanks ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
[Interest] Animation Framework
Hi If I have a group of animations and have added them to a group - QPropertyAnimation *Animation1 = new QPropertyAnimation(widget1, pos); QPropertyAnimation *Animation2 = new QPropertyAnimation(widget2, pos); QParallelAnimationGroup *animationGroup = new QParallelAnimationGroup; animationGroup -addAnimation(Animation1); animationGroup -addAnimation(Animation2); animgroup-start(QAbstractAnimation::DeleteWhenStopped); Does this result in a memory leak or will the individual animations be deleted when the animation group completes ? Thanks ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Animation Framework
Thanks -Original Message- From: interest-bounces+graham.labdon=avalonsciences@qt-project.org [mailto:interest-bounces+graham.labdon=avalonsciences@qt-project.org] On Behalf Of Nurmi J-P Sent: 02 December 2013 16:19 To: Interest@qt-project.org Subject: Re: [Interest] Animation Framework On 02 Dec 2013, at 16:40, Graham Labdon graham.lab...@avalonsciences.com wrote: Hi If I have a group of animations and have added them to a group - QPropertyAnimation *Animation1 = new QPropertyAnimation(widget1, pos); QPropertyAnimation *Animation2 = new QPropertyAnimation(widget2, pos); QParallelAnimationGroup *animationGroup = new QParallelAnimationGroup; animationGroup -addAnimation(Animation1); animationGroup -addAnimation(Animation2); animgroup-start(QAbstractAnimation::DeleteWhenStopped); Does this result in a memory leak or will the individual animations be deleted when the animation group completes ? Hi, It won't leak, since QAnimationGroup takes ownership of the grouped animations. http://qt-project.org/doc/qt-5.1/qtcore/qanimationgroup.html#addAnimation Note: The group takes ownership of the animation. -- J-P Nurmi ___ 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] Designer plugins
Hi I am developing a plugin for Qt Designer and wonder if anyone has any tips for debugging it. For some reason my plugin does not appear in Qt Designer so there must be a problem in the dll but I don't know how to attempt the debug the problem Any help would be appreciated Thanks ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Designer plugins
I was aware of that I have other plugins that work well, but I cannot debug the one I am currently working on From: Joseph Crowell [mailto:joseph.w.crow...@gmail.com] Sent: 29 November 2013 11:05 To: Graham Labdon Subject: Re: [Interest] Designer plugins For a plugin to show up in Designer/Creator, it must be compiled using the same compiler that is used to compile Designer/Creator. On 11/29/2013 09:54 AM, Graham Labdon wrote: Hi I am developing a plugin for Qt Designer and wonder if anyone has any tips for debugging it. For some reason my plugin does not appear in Qt Designer so there must be a problem in the dll but I don't know how to attempt the debug the problem Any help would be appreciated Thanks ___ Interest mailing list Interest@qt-project.orgmailto: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 Designer container plugin
Hi If I add a QStackedWidget in designer I get a means to change pages (little black triangle) I have a developed a multi page designer plugin and when I use the extension I do not get the triangles to change pages. Is this expected behaviour or how can I get them to appear? Thanks ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
[Interest] Desinger plugins
Hi I have developed 2 designer plugins 1 is a container based on stack widget and the other is based on a QLabel. I can use them both individually but if I place my label based widget on a stacked widget page I get errors of the this nature - QPainter::begin: A paint device can only be painted by one painter at a time. QPainter::translate: Painter not active I would be grateful if anyone can tell me the likely source of this error? Thanks ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
[Interest] Setting Widget opacity
Hi I want to set the window opacity of some widgets so I started with ui.buttonLabel_4-setWindowOpacity(0.0); which had no effect then I tried QGraphicsOpacityEffect* opacityEffect = new QGraphicsOpacityEffect(this); // make sure to create using new, since effect has to be alive as long as the target widget is using it. opacityEffect-setOpacity(0.0); // initially widget should be visible ui.buttonLabel_4-setGraphicsEffect(opacityEffect); which has the desired effect. My question is why did my first option not work? Thanks ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] animation problems
This is the approach I am now taking -Original Message- From: interest-bounces+graham.labdon=avalonsciences@qt-project.org [mailto:interest-bounces+graham.labdon=avalonsciences@qt-project.org] On Behalf Of André Somers Sent: 26 November 2013 09:25 To: interest@qt-project.org Subject: Re: [Interest] animation problems Mitch Curtis schreef op 26-11-2013 9:59: On 11/25/2013 03:30 PM, Nurmi J-P wrote: On 25 Nov 2013, at 14:57, Graham Labdon graham.lab...@avalonsciences.com wrote: Hi I am trying to animate the movement of one of my widgets I have a simple Qt app consists of a main window with a label (done in QDesigner) The code to move the label is QPropertyAnimation animation(ui.label,geometry); animation.setDuration(1); animation.setStartValue(ui.label-rect()); QRect end = QRect(ui.label-rect().x() - 10,ui.label-y() - 10,ui.label-rect().width(),ui.label-rect().height()); animation.setEndValue(end); animation.start(); Now this does move the label but it is move instantly whereas I thought that by specifying a duration , this would be how long it took to do the animation. I would be grateful if some could explain what I am doing wrong Hi, try allocating the animation on the heap so that it won't get immediately destructed according to the normal C++ scoping rules. Perhaps the documentation shouldn't construct it on the stack if that's not how it's meant to be used: http://doc-snapshot.qt-project.org/qt5-stable/animation-overview.html# animating-qt-properties I can see that the person writing that example probably did it in main(), but that's not how most people will be using it. Should I submit a patch? I'm not sure if creating on the heap is the usual pattern either. I usually have my animations as members in an object, not created separately on the heap. André ___ 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] Re using graphics effects
Hi I have applied a graphics effect to a widget - QGraphicsOpacityEffect* opacityEffect = new QGraphicsOpacityEffect(this); // make sure to create using new, since effect has to be alive as long as the target widget is using it. opacityEffect-setOpacity(0.0); // initially widget should be invisible ui.buttonLabel_4-setGraphicsEffect(opacityEffect); Now I want the same effect on another widget so I did this - ui.buttonLabel_5-setGraphicsEffect(opacityEffect); This has the effect of making the second widget transparent but makes the first visible. Why am I unable to share the graphics effect object? Thanks ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
[Interest] Help understanding style sheets
Hi In QDesigner I have a main form containing 1 widget. I am able to set the style sheet so that it has a border image – border-image: url(:/TestStackedWidget/EMU Index Background.png); This works and I get a border image displayed But I want this widget to be one of my custom widgets so I promote it via designer When the program is run the border image is not displayed and I do not understand why I have tried setting the style sheet programtically – ui.page-setStyleSheet({border-image: url(:/TestStackedWidget/Background.png)};); orui.page-setStyleSheet(MyWidget#page {border-image: url(:/TestStackedWidget/Background.png)};); but to no avail I would be grateful if someone could explain what is going on Thanks ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Help understanding style sheets
Hi Just found I need to implement paintEvent in my custom class From: graham.lab...@hotmail.co.uk To: interest@qt-project.org Date: Tue, 26 Nov 2013 13:43:06 + Subject: [Interest] Help understanding style sheets Hi In QDesigner I have a main form containing 1 widget. I am able to set the style sheet so that it has a border image – border-image: url(:/TestStackedWidget/EMU Index Background.png); This works and I get a border image displayed But I want this widget to be one of my custom widgets so I promote it via designer When the program is run the border image is not displayed and I do not understand why I have tried setting the style sheet programtically – ui.page-setStyleSheet({border-image: url(:/TestStackedWidget/Background.png)};); orui.page-setStyleSheet(MyWidget#page {border-image: url(:/TestStackedWidget/Background.png)};); but to no avail I would be grateful if someone could explain what is going on 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] change time delay of tool tips
Hi Is it possible to change the delay for the display of tooltips I have some widgets that I would like the display of the tool tip to be quicker? Thanks ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] change time delay of tool tips
Thanks for the hints -Original Message- From: interest-bounces+graham.labdon=avalonsciences@qt-project.org [mailto:interest-bounces+graham.labdon=avalonsciences@qt-project.org] On Behalf Of Nurmi J-P Sent: 25 November 2013 09:33 To: Interest@qt-project.org Subject: Re: [Interest] change time delay of tool tips On 25 Nov 2013, at 10:17, Graham Labdon graham.lab...@avalonsciences.com wrote: Hi Is it possible to change the delay for the display of tooltips I have some widgets that I would like the display of the tool tip to be quicker? Qt 5.2 adds a bunch of ways to control tooltips: - QWidget::toolTipDuration http://doc-snapshot.qt-project.org/qt5-release/qwidget.html#toolTipDuration-prop - QStyle::SH_ToolTip_WakeUpDelay - QStyle::SH_ToolTip_FallAsleepDelay http://doc-snapshot.qt-project.org/qt5-release/qstyle.html#StyleHint-enum PS. If you're wondering how to customize the style hints, take a look at QProxyStyle (http://doc-snapshot.qt-project.org/qt5-release/qproxystyle.html). -- J-P Nurmi ___ 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] change time delay of tool tips
However, this only allows me to set the tooltip duration - what I would like is to be able to control the delay before the tool tip is displayed Is there a way of doing this? -Original Message- From: interest-bounces+graham.labdon=avalonsciences@qt-project.org [mailto:interest-bounces+graham.labdon=avalonsciences@qt-project.org] On Behalf Of Graham Labdon Sent: 25 November 2013 10:09 To: Nurmi J-P; Interest@qt-project.org Subject: Re: [Interest] change time delay of tool tips Thanks for the hints -Original Message- From: interest-bounces+graham.labdon=avalonsciences@qt-project.org [mailto:interest-bounces+graham.labdon=avalonsciences@qt-project.org] On Behalf Of Nurmi J-P Sent: 25 November 2013 09:33 To: Interest@qt-project.org Subject: Re: [Interest] change time delay of tool tips On 25 Nov 2013, at 10:17, Graham Labdon graham.lab...@avalonsciences.com wrote: Hi Is it possible to change the delay for the display of tooltips I have some widgets that I would like the display of the tool tip to be quicker? Qt 5.2 adds a bunch of ways to control tooltips: - QWidget::toolTipDuration http://doc-snapshot.qt-project.org/qt5-release/qwidget.html#toolTipDuration-prop - QStyle::SH_ToolTip_WakeUpDelay - QStyle::SH_ToolTip_FallAsleepDelay http://doc-snapshot.qt-project.org/qt5-release/qstyle.html#StyleHint-enum PS. If you're wondering how to customize the style hints, take a look at QProxyStyle (http://doc-snapshot.qt-project.org/qt5-release/qproxystyle.html). -- J-P Nurmi ___ 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] change time delay of tool tips
Just been reading them When I try to use QStyle::SH_ToolTip_WakeUpDelay I get a compilation error saying that this does not exist. Looking at the source for QStyle it appears that it does not exist Any ideas as to why this is? Thanks -Original Message- From: interest-bounces+graham.labdon=avalonsciences@qt-project.org [mailto:interest-bounces+graham.labdon=avalonsciences@qt-project.org] On Behalf Of André Somers Sent: 25 November 2013 10:33 To: interest@qt-project.org Subject: Re: [Interest] change time delay of tool tips Graham Labdon schreef op 25-11-2013 11:11: However, this only allows me to set the tooltip duration - what I would like is to be able to control the delay before the tool tip is displayed Is there a way of doing this? Did you read the docs for those style hints that J-P Nurmi pointed you to? André -Original Message- From: interest-bounces+graham.labdon=avalonsciences@qt-project.org [mailto:interest-bounces+graham.labdon=avalonsciences.com@qt-project.o rg] On Behalf Of Graham Labdon Sent: 25 November 2013 10:09 To: Nurmi J-P; Interest@qt-project.org Subject: Re: [Interest] change time delay of tool tips Thanks for the hints -Original Message- From: interest-bounces+graham.labdon=avalonsciences@qt-project.org [mailto:interest-bounces+graham.labdon=avalonsciences.com@qt-project.o rg] On Behalf Of Nurmi J-P Sent: 25 November 2013 09:33 To: Interest@qt-project.org Subject: Re: [Interest] change time delay of tool tips On 25 Nov 2013, at 10:17, Graham Labdon graham.lab...@avalonsciences.com wrote: Hi Is it possible to change the delay for the display of tooltips I have some widgets that I would like the display of the tool tip to be quicker? Qt 5.2 adds a bunch of ways to control tooltips: - QWidget::toolTipDuration http://doc-snapshot.qt-project.org/qt5-release/qwidget.html#toolTipDur ation-prop - QStyle::SH_ToolTip_WakeUpDelay - QStyle::SH_ToolTip_FallAsleepDelay http://doc-snapshot.qt-project.org/qt5-release/qstyle.html#StyleHint-e num PS. If you're wondering how to customize the style hints, take a look at QProxyStyle (http://doc-snapshot.qt-project.org/qt5-release/qproxystyle.html). -- J-P Nurmi ___ 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 -- You like Qt? I am looking for collegues to join me at i-Optics! ___ 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] animation problems
Hi I am trying to animate the movement of one of my widgets I have a simple Qt app consists of a main window with a label (done in QDesigner) The code to move the label is QPropertyAnimation animation(ui.label,geometry); animation.setDuration(1); animation.setStartValue(ui.label-rect()); QRect end = QRect(ui.label-rect().x() - 10,ui.label-y() - 10,ui.label-rect().width(),ui.label-rect().height()); animation.setEndValue(end); animation.start(); Now this does move the label but it is move instantly whereas I thought that by specifying a duration , this would be how long it took to do the animation. I would be grateful if some could explain what I am doing wrong Thanks ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] animation problems
Ah thanks!! -Original Message- From: interest-bounces+graham.labdon=avalonsciences@qt-project.org [mailto:interest-bounces+graham.labdon=avalonsciences@qt-project.org] On Behalf Of Nurmi J-P Sent: 25 November 2013 14:30 To: Interest@qt-project.org Subject: Re: [Interest] animation problems On 25 Nov 2013, at 14:57, Graham Labdon graham.lab...@avalonsciences.com wrote: Hi I am trying to animate the movement of one of my widgets I have a simple Qt app consists of a main window with a label (done in QDesigner) The code to move the label is QPropertyAnimation animation(ui.label,geometry); animation.setDuration(1); animation.setStartValue(ui.label-rect()); QRect end = QRect(ui.label-rect().x() - 10,ui.label-y() - 10,ui.label-rect().width(),ui.label-rect().height()); animation.setEndValue(end); animation.start(); Now this does move the label but it is move instantly whereas I thought that by specifying a duration , this would be how long it took to do the animation. I would be grateful if some could explain what I am doing wrong Hi, try allocating the animation on the heap so that it won't get immediately destructed according to the normal C++ scoping rules. QPropertyAnimation *animation = new QPropertyAnimation(ui.label,geometry); ... animation-start(QAbstractAnimation::DeleteWhenStopped); -- J-P Nurmi ___ 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] Custom QPushButton
Thanks for that - I will give it a try -Original Message- From: interest-bounces+graham.labdon=avalonsciences@qt-project.org [mailto:interest-bounces+graham.labdon=avalonsciences@qt-project.org] On Behalf Of Rayner Pupo Sent: 22 November 2013 03:00 To: interest@qt-project.org Subject: [Interest] Custom QPushButton You can do whatever you want by subclassing QPushButton and reimplementing paintEvent function. using QStyleOptionButton you can draw the button exactly like a normal one but looking allways like normal state, just set the propper button feature for the styleOption III Escuela Internacional de Invierno en la UCI del 17 al 28 de febrero del 2014. Ver www.uci.cu ___ 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 Quick on desktop applications
Hi Is it viable to develop a complex desktop application using QML for the user interface? Regards ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Qt Quick on desktop applications
Sounds like it's worth looking at Would it be difficult to convert an existing ui to Qml? From: Frédéric Meurou [mailto:fmeu...@wapp6.com] Sent: 22 November 2013 10:38 To: Graham Labdon Cc: Interest@qt-project.org Subject: Re: [Interest] Qt Quick on desktop applications Hi Graham, IMHO, it is viable since : - you'll get more and more touch screens - people are getting used to touch interfaces - Quick Controls allows you to mimick widgets - You get GL acceleration on QML - it is easy to create custom components. From my recent experience, I don't think i'll use widgets anymore. Regards, Frederic 2013/11/22 Graham Labdon graham.lab...@avalonsciences.commailto:graham.lab...@avalonsciences.com Hi Is it viable to develop a complex desktop application using QML for the user interface? Regards ___ Interest mailing list Interest@qt-project.orgmailto:Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest -- Frédéric MEUROU Directeur Technique Wapp6 Mob +33 6 07 34 62 13 Fixe +33 1 79 84 17 57 Email fmeu...@wapp6.commailto:fmeu...@wapp6.com Adresse 191 avenue Aristide Briand, 94230 Cachan www.wapp6.comhttp://www.wapp6.com/ Avant d'imprimer cet email, pensez à l'environnement. Ce message et toutes les pièces jointes (ci-après le message) sont établis à l'intention exclusive de ses destinataires et sont confidentiels. Si vous recevez ce message par erreur, merci de le détruire et d'en avertir immédiatement l'expéditeur. Toute utilisation de ce message non conforme à sa destination, toute diffusion ou toute publication, totale ou partielle, est interdite, sauf autorisation expresse. L'internet ne permettant pas d'assurer l'intégrité de ce message, WAPP6 (et ses filiales) décline(nt) toute responsabilité au titre de ce message, dans l'hypothèse ou il aurait été modifié, altéré ou falsifié. WAPP6 vous remercie de votre attention. ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Qt Quick on desktop applications
My application has some rather complicated graphical aspects such as displaying large data sets as a plotted graph. Would this be possible in qml? From: Frédéric Meurou [mailto:fmeu...@wapp6.com] Sent: 22 November 2013 10:51 To: Graham Labdon Cc: Interest@qt-project.org Subject: Re: [Interest] Qt Quick on desktop applications I guess with Quick Controls and layout elements it might be easy. My approach would be to rethink the UI considering new possibilities offered by QML, which is much more flexible when it comes to UI design. Le 22 novembre 2013 10:47, Graham Labdon graham.lab...@avalonsciences.commailto:graham.lab...@avalonsciences.com a écrit : Sounds like it's worth looking at Would it be difficult to convert an existing ui to Qml? From: Frédéric Meurou [mailto:fmeu...@wapp6.commailto:fmeu...@wapp6.com] Sent: 22 November 2013 10:38 To: Graham Labdon Cc: Interest@qt-project.orgmailto:Interest@qt-project.org Subject: Re: [Interest] Qt Quick on desktop applications Hi Graham, IMHO, it is viable since : - you'll get more and more touch screens - people are getting used to touch interfaces - Quick Controls allows you to mimick widgets - You get GL acceleration on QML - it is easy to create custom components. From my recent experience, I don't think i'll use widgets anymore. Regards, Frederic 2013/11/22 Graham Labdon graham.lab...@avalonsciences.commailto:graham.lab...@avalonsciences.com Hi Is it viable to develop a complex desktop application using QML for the user interface? Regards ___ Interest mailing list Interest@qt-project.orgmailto:Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest -- Frédéric MEUROU Directeur Technique Wapp6 Mob +33 6 07 34 62 13tel:%2B33%206%2007%2034%2062%2013 Fixe +33 1 79 84 17 57tel:%2B33%201%2079%2084%2017%2057 Email fmeu...@wapp6.commailto:fmeu...@wapp6.com Adresse 191 avenue Aristide Briand, 94230 Cachan www.wapp6.comhttp://www.wapp6.com/ Avant d'imprimer cet email, pensez à l'environnement. Ce message et toutes les pièces jointes (ci-après le message) sont établis à l'intention exclusive de ses destinataires et sont confidentiels. Si vous recevez ce message par erreur, merci de le détruire et d'en avertir immédiatement l'expéditeur. Toute utilisation de ce message non conforme à sa destination, toute diffusion ou toute publication, totale ou partielle, est interdite, sauf autorisation expresse. L'internet ne permettant pas d'assurer l'intégrité de ce message, WAPP6 (et ses filiales) décline(nt) toute responsabilité au titre de ce message, dans l'hypothèse ou il aurait été modifié, altéré ou falsifié. WAPP6 vous remercie de votre attention. -- Frédéric MEUROU Directeur Technique Wapp6 Mob +33 6 07 34 62 13 Fixe +33 1 79 84 17 57 Email fmeu...@wapp6.commailto:fmeu...@wapp6.com Adresse 191 avenue Aristide Briand, 94230 Cachan www.wapp6.comhttp://www.wapp6.com/ Avant d'imprimer cet email, pensez à l'environnement. Ce message et toutes les pièces jointes (ci-après le message) sont établis à l'intention exclusive de ses destinataires et sont confidentiels. Si vous recevez ce message par erreur, merci de le détruire et d'en avertir immédiatement l'expéditeur. Toute utilisation de ce message non conforme à sa destination, toute diffusion ou toute publication, totale ou partielle, est interdite, sauf autorisation expresse. L'internet ne permettant pas d'assurer l'intégrité de ce message, WAPP6 (et ses filiales) décline(nt) toute responsabilité au titre de ce message, dans l'hypothèse ou il aurait été modifié, altéré ou falsifié. WAPP6 vous remercie de votre attention. ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
[Interest] Custom QPushButton
Hi How can I stop the appearance of a QPushButton changing when it is hovered over or pressed. I know how to change the background colour for these events by setting the appropriate stylesheet, but cannot see how I can stop them changing at all. I would appreciate some help in getting this working Thanks ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
[Interest] background images
Hi I have a widget to which I want to apply a background image I have done this by using a style sheet - background-image: url(:/TestLogo/ASL2014 EMU Landscape background.jpg); background-position: top left; background-repeat: no-repeat; This is fine as far as it goes- But when the window is re-sized by the user the image does not fill the whole of the widget. How is the best way to apply a background image to a widget and have it fill the whole of the widget when it is resized? Thanks ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
[Interest] Assistant is slow in my application
Hi My application uses QAssistant as the help viewer and works well on my development machine. However, when I install the application on a target machine Assistant takes 30s to appear. Has anyone else experienced this before? Anyone got any suggestions as to why it should be slow on the target machine? Thanks ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
[Interest] correct d_ptr implementation
Hi I am developing a library and in Qt Tradition I want to use the d_ptr pattern. I have no previous experience of using this pattern and have a simple example working but wanted to check that my implementation is correct. To that end I have set out my classes below and would be grateful if anyone could confirm that my approach is correct(or not) Thanks Header file #ifndef DISPLAYWIDGET_H #define DISPLAYWIDGET_H #include DisplayWidgetsGlobal.h #include QWidget class DisplayWidgetPrivate; class DISPLAYWIDGETS_EXPORT DisplayWidget : public QWidget { Q_OBJECT public: DisplayWidget(QWidget *parent); ~DisplayWidget(); private: DisplayWidgetPrivate* d_ptr; Q_DECLARE_PRIVATE(DisplayWidget) }; #endif // DISPLAYWIDGET_H Private Header file #include DisplayWidget.h class QLabel; class DisplayWidgetPrivate { public: DisplayWidgetPrivate (DisplayWidget* parent); void init(); QLabel* m_label; DisplayWidget* const q_ptr; Q_DECLARE_PUBLIC(DisplayWidget) public: DisplayWidgetPrivate(); }; Implementation file #include QLabel #include DisplayWidget.h #include DisplayWidget_p.h DisplayWidgetPrivate::DisplayWidgetPrivate(DisplayWidget* parent) : q_ptr(parent) { } void DisplayWidgetPrivate::init() { m_label = new QLabel(This is a label,q_ptr); } DisplayWidget::DisplayWidget(QWidget *parent) : QWidget(parent), d_ptr(new DisplayWidgetPrivate(this)) { Q_D(DisplayWidget); d-init(); } DisplayWidget::~DisplayWidget() { } ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
[Interest] compilation error in qdatetime
Hi I amusing Qt5 with Visual Studio and one of my projects is giving the following error c:\qt\qt5.1.1\5.1.1\msvc2012\include\qtcore\qdatetime.h(121): error C2589: '(' : illegal token on right side of '::' 1c:\qt\qt5.1.1\5.1.1\msvc2012\include\qtcore\qdatetime.h(121): error C2059: syntax error : '::' 1 moc_EventSimulator.cpp I can get a successful compilation by adding 'NOMINMAX' to the list of pre processor macros I would be grateful if someone could explain why this error occurs Thanks ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] compilation error in qdatetime
I have defined a macro named min in my code! -Original Message- From: interest-bounces+graham.labdon=avalonsciences@qt-project.org [mailto:interest-bounces+graham.labdon=avalonsciences@qt-project.org] On Behalf Of Thiago Macieira Sent: 08 November 2013 16:40 To: interest@qt-project.org Subject: Re: [Interest] compilation error in qdatetime On sexta-feira, 8 de novembro de 2013 16:36:14, Graham Labdon wrote: Hi I amusing Qt5 with Visual Studio and one of my projects is giving the following error c:\qt\qt5.1.1\5.1.1\msvc2012\include\qtcore\qdatetime.h(121): error C2589: '(' : illegal token on right side of '::' 1c:\qt\qt5.1.1\5.1.1\msvc2012\include\qtcore\qdatetime.h(121): error C2059: syntax error : '::' 1 moc_EventSimulator.cpp I can get a successful compilation by adding 'NOMINMAX' to the list of pre processor macros I would be grateful if someone could explain why this error occurs The error occurs because that line is: static inline qint64 nullJd() { return std::numeric_limitsqint64::min(); } If you have a macro called min, it will wreak havoc with the source code. Please stop defining macros called min. We're in 2013. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
[Interest] Visual Studio addin and lupdate
Hi I am using the Qt Visual Studio and for some reason when I run the lupdate tool from withing the addin my .ts files are not updated. There is no output from running lupdate and I was wondering if there are ant settings I can use to get the output from the tool so I can investigate why the .ts files are not updated. If anyone has any information about this I would be grateful to hear from you Thanks ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Visual Studio addin and lupdate
It seems that the option to update all ts files in the project does not work, I am able to update the files individually from within the addin -Original Message- From: Koehne Kai [mailto:kai.koe...@digia.com] Sent: 05 November 2013 08:59 To: Graham Labdon; Interest@qt-project.org Subject: RE: Visual Studio addin and lupdate -Original Message- From: interest-bounces+kai.koehne=digia@qt-project.org [mailto:interest-bounces+kai.koehne=digia@qt-project.org] On Behalf Of Graham Labdon Sent: Tuesday, November 05, 2013 9:40 AM To: Interest@qt-project.org Subject: [Interest] Visual Studio addin and lupdate Hi I am using the Qt Visual Studio and for some reason when I run the lupdate tool from withing the addin my .ts files are not updated. There is no output from running lupdate and I was wondering if there are ant settings I can use to get the output from the tool so I can investigate why the .ts files are not updated. A shot in the dark: lupdate.exe might be considered by Windows User Access Control (UAC) as an 'installer' (it has 'update' in its name, right)? And therefore require administrative privileges. I think we actually fixed that a long time ago (Qt 4.7?) by embedding a manifest file explicitly declaring that it's _not_ an installer, but that doesn't work e.g. for the MinGW version. Or you're using an even older Qt version ... You can easily check whether that's the issue by launching the lupdate.exe from the command line. Does it print anything, or bring up the UAC nagging screen? Regards Kai ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
[Interest] Where have my images gone?
Hi My project has images stored as Qt resources and I have somehow broken my project so that they are no longer displayed in my application. If I open the Qt Resource editor I can see them, I can also see the in QDesigner. When I compile the project the qrc_***.cpp file gets generated I would be grateful if someone could help me determine why the images are not rendered in my application. I am using Qt5 with Visual Studio 2012 Thanks ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
[Interest] Styling QTabWidget
Hi I am trying to style QTabWidget so that the tabs have rounded corners and the background colour of the tab widgets is light blue. The stylesheet I am using is - @ QTabWidget QWidget { background-color: lightblue; } QTabWidget::pane { /* The tab widget frame */ border-top: 2px solid #C2C7CB; } QTabWidget::tab-bar { left: 5px; /* move to the right by 5px */ } /* Style the tab using the tab sub-control. Note that it reads QTabBar _not_ QTabWidget */ QTabBar::tab { min-height: 24px; border-top: 1px solid palette(mid); border-left: 1px solid palette(mid); border-bottom: 0px; border-top-left-radius: 8px; border-top-right-radius: 8px; margin-top: -1px; margin-right: 4px; padding-left: 5px; background: rgb(210, 221, 239); } QTabBar::tab:selected, QTabBar::tab:hover { border-bottom: 1px solid palette(mid); background: yellow; } QTabBar::tab:!selected { margin-top: 5px; background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 rgb(156, 181, 220), stop:1 rgb(130, 160, 210)); } @ This is almost what I need except that the area behind the tab bar is the same color as the tab widget which is undesirable. Is there a way of removing this? https://www.dropbox.com/s/eak424onhblfmxo/tabs.png Thanks ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
[Interest] QRegularExpression
Hi Is it possible to use QRegularExpression to perform search and replace on a string? I know I can use QString::replace and pass a regular expression, but wanted to know if it's possible (and how) using just QRegularExpression Thanks ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
[Interest] Style plugin
Hi I am trying to follow the style plugin example given here - http://qt-project.org/doc/qt-5.0/qtwidgets/tools-styleplugin.html The docs state that Note: On some platforms, the native style will prevent the button from having a red background. In this case, try to run the example in another style (e.g., fusion). And indeed on my Windows 7 box the color of the button is unchanged. Does this mean that there is no way to change the backgound color of a widget using style plugins on windows? Thanks ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
[Interest] QTabBar events
Hi I want track mouse events occurring in the QTabBar widget inside my QTabWidget but dont see how to do this. I would be grateful if someone could provide some hints Thanks ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Compilation error
Hi Where can I find a list of supported toolchains? -Original Message- From: interest-bounces+graham.labdon=avalonsciences@qt-project.org [mailto:interest-bounces+graham.labdon=avalonsciences@qt-project.org] On Behalf Of Koehne Kai Sent: 28 August 2013 19:01 To: Thiago Macieira; interest@qt-project.org Subject: Re: [Interest] Compilation error On quarta-feira, 28 de agosto de 2013 15:27:07, Koehne Kai wrote: main.cpp:196:36: error: '_fileno' was not declared in this scope [...] I would be grateful if anyone can advise why I am getting this error and how I might fix it First of all, you're apparently not alone http://qt-project.org/forums/viewthread/26287 . Anyway, which mingw gcc / package are you using? fileno(3) is POSIX.1. It's not part of the C nor C++ standard libraries. On Windows, MS decided to add some POSIX functions with an underscore (_fileno, _open, etc.). Therefore, the correct on Windows is _fileno. Conclusion: your C headers are broken. To extend this a bit: For Qt 5.x we're recommending a toolchain that uses a pretty recent version of the headers / runtime from the MinGW-w64 project. The official binaries for 5.1 are generated with http://sourceforge.net/projects/mingwbuilds/files/host-windows/releases/4.8.0/32-bit/threads-posix/dwarf/x32-4.8.0-release-posix-dwarf-rev2.7z , but other toolchains like from TDM-gcc that also rely on MinGW-w64 should do to (though we don't test this actively). Could be that you're using a toolchain from mingw.org . That's not supported. Regards Kai -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center ___ 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] Compilation error
Hi I just downloaded Qt 5.1.1 I used configure as follows configure -platform win32-g++ -opengl desktop When I compile I am getting this error - main.cpp: In member function 'virtual QVariant PatternistApplicationParser::defaultValue(const QApplicationArgument) const': main.cpp:196:36: error: '_fileno' was not declared in this scope mingw32-make[4]: *** [.obj/release_shared/main.o] Error 1 mingw32-make[3]: *** [release] Error 2 mingw32-make[2]: *** [sub-xmlpatterns-make_first] Error 2 mingw32-make[1]: *** [sub-tools-make_first] Error 2 mingw32-make: *** [module-qtxmlpatterns-make_first] Error 2 I would be grateful if anyone can advise why I am getting this error and how I might fix it Thanks ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
[Interest] set background color for toolButton
Hi I am trying to set the background colour for a checkable QToolButton - 1. void test2::on_toolButton_clicked() 2. { 3.if (!ui.toolButton-isChecked()) 4.{ 5. ui.toolButton-setStyleSheet(background-color: green); 6.} 7.else 8.{ 9. ui.toolButton-setStyleSheet(background-color: red); 10. } 11. } First time this gets called the color is solid green The next time the color gets set to red, but it not solid, it seems to be cross hatched with white Can anyone tell me why this might happen? Thanks ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
[Interest] Possible buf in QDialog
Hello I would be grateful if some one could confirm the following behaviour in Qt5 Create a dialog add some widgets for these widgets add a Whats This string. When the dialog is displayed and the '?' is pressed I get the whats this cursor but not what this is displayed. When compiled for Qt4.8.2 the dialog behaves as expected. Is this a bug or have things changed in Qt5? Thanks ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
[Interest] GUI help/opinion check boxes
Hi As part of my application the user needs to be able to select from a set of up to 64 options. Any combination is allowed and I need a method of selecting/de-selecting all of the options. As a starting point I am showing (up to) 64 check boxes but by default these are 'ticked' which does not look particularly pleasing. Has anyone got any ideas on how best to implement this? Thanks G ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
[Interest] Qt Installer Framework - unistall
Hi Is there a way of controlling what goes into the uninstaller that is created? I need to delete some files not specified in the unistaller Thanks ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
[Interest] Qt Installer Framework vars
Hi I have seen this comment in some example config.xml files - @homeDir@ and @rootDir@ are some of the supported vars And was wondering what other vars are supported Can anyone help me with this? Thanks ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest