You are not logged in.

Dear visitor, welcome to QtForum.org. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Tuesday, September 6th 2005, 11:17am

Your experience with Qt3 -> Qt4 ?

What is your experience with migrating to Qt4 ?
Below are some issues I have.
################################################

Why is it not possible to reuse the ui files from Qt3 ?
(The generated code will also be different)

Why did I have to replace <fstream> by QTextStream ?
Why is there no automatic cast from QString to (const char *) ?
Unicode ?

Qt Designer seems not to be complete.
E.g. Why can I not set a pixmap in QLabel ?

Can anybody tell me why the SocketNotifier is so slow under Windows ?
Yes, it's because they dropped support for "extern Q_EXPORT bool qt_win_use_simple_timers;"

Why did they not continue the old classes for ListView, Table and IconView ?
At least for item based programming ?

When Qt5 will come out (let's say in 4 years), will we have the same procedure again ?

Was it necessary that this amount of classes was moved to "qt3support" ?
#########################################################################
me@mybox:~/qt-x11-opensource-src-4.0.1/include/Qt3Support> ls
headers.pri Q3GListStdIterator Q3RangeControl
private Q3Grid q3rangecontrol.h
Q3Accel q3grid.h Q3ScrollView
q3accel.h Q3GridView q3scrollview.h
Q3Action q3gridview.h Q3Semaphore
Q3ActionGroup Q3GroupBox q3semaphore.h
q3action.h q3groupbox.h Q3ServerSocket
Q3AsciiBucket Q3GVector q3serversocket.h
Q3AsciiCache q3gvector.h Q3Shared
q3asciicache.h Q3HBox q3shared.h
Q3AsciiCacheIterator q3hbox.h Q3Signal
Q3AsciiDict Q3HButtonGroup q3signal.h
q3asciidict.h Q3Header Q3SimpleRichText
Q3AsciiDictIterator q3header.h q3simplerichtext.h
Q3BaseBucket Q3Http Q3SingleCleanupHandler
Q3Button q3http.h Q3Socket
Q3ButtonGroup Q3HttpHeader Q3SocketDevice
q3buttongroup.h Q3HttpRequestHeader q3socketdevice.h
q3button.h Q3HttpResponseHeader q3socket.h
Q3Cache Q3IconDrag Q3SortedList
q3cache.h Q3IconDragItem q3sortedlist.h
Q3CacheIterator Q3IconView Q3SpinWidget
Q3Canvas q3iconview.h Q3SqlCursor
Q3CanvasEllipse Q3IconViewItem q3sqlcursor.h
q3canvas.h Q3ImageDrag Q3SqlEditorFactory
Q3CanvasItem Q3IntBucket q3sqleditorfactory.h
Q3CanvasItemList Q3IntCache Q3SqlFieldInfo
Q3CanvasLine q3intcache.h q3sqlfieldinfo.h
Q3CanvasPixmap Q3IntCacheIterator Q3SqlFieldInfoList
Q3CanvasPixmapArray Q3IntDict Q3SqlForm
Q3CanvasPolygon q3intdict.h q3sqlform.h
Q3CanvasPolygonalItem Q3IntDictIterator Q3SqlPropertyMap
Q3CanvasRectangle Q3ListBox q3sqlpropertymap.h
Q3CanvasSpline q3listbox.h Q3SqlRecordInfo
Q3CanvasSprite Q3ListBoxItem q3sqlrecordinfo.h
Q3CanvasText Q3ListBoxPixmap Q3SqlSelectCursor
Q3CanvasView Q3ListBoxText q3sqlselectcursor.h
Q3CheckListItem Q3ListView Q3StoredDrag
Q3CheckTableItem q3listview.h Q3StrIList
Q3CleanupHandler Q3ListViewItem Q3StringBucket
q3cleanuphandler.h Q3ListViewItemIterator Q3StrIVec
Q3ColorDrag Q3LNode Q3StrList
Q3ComboTableItem Q3LocalFs q3strlist.h
Q3CString q3localfs.h Q3StrListIterator
q3cstring.h Q3MainWindow Q3StrVec
Q3DataBrowser q3mainwindow.h q3strvec.h
q3databrowser.h Q3MemArray Q3StyleSheet
Q3DataTable q3memarray.h q3stylesheet.h
q3datatable.h q3mimefactory.h Q3StyleSheetItem
Q3DataView Q3MimeSourceFactory Q3SyntaxHighlighter
q3dataview.h Q3MultiLineEdit q3syntaxhighlighter.h
Q3DateEdit q3multilineedit.h Q3TabDialog
Q3DateTimeEdit q3network.h q3tabdialog.h
Q3DateTimeEditBase Q3NetworkOperation Q3Table
q3datetimeedit.h Q3NetworkProtocol q3table.h
Q3DeepCopy Q3NetworkProtocolDict Q3TableItem
q3deepcopy.h Q3NetworkProtocolFactory Q3TableSelection
Q3Dict Q3NetworkProtocolFactoryBase Q3TextBrowser
q3dict.h q3networkprotocol.h q3textbrowser.h
Q3DictIterator q3objectdict.h Q3TextDrag
Q3Dns Q3ObjectDictionary Q3TextEdit
q3dns.h Q3PaintDeviceMetrics q3textedit.h
Q3DnsSocket q3paintdevicemetrics.h Q3TextEditOptimPrivate
Q3DockArea Q3Painter Q3TextView
q3dockarea.h q3painter.h q3textview.h
Q3DockAreaLayout Q3Picture Q3TimeEdit
Q3DockWindow q3picture.h q3tl.h
q3dockwindow.h Q3PointArray Q3ToolBar
Q3DragObject q3pointarray.h q3toolbar.h
q3dragobject.h Q3PolygonScanner Q3UriDrag
Q3DropSite q3polygonscanner.h Q3Url
q3dropsite.h Q3PopupMenu q3url.h
Q3EditorFactory q3popupmenu.h Q3UrlOperator
q3editorfactory.h Q3Process q3urloperator.h
Q3FileDialog q3process.h Q3ValueList
q3filedialog.h Q3ProgressBar Q3ValueListConstIterator
Q3FileIconProvider q3progressbar.h q3valuelist.h
Q3FilePreview Q3ProgressDialog Q3ValueListIterator
Q3Frame q3progressdialog.h Q3ValueStack
q3frame.h Q3PtrBucket q3valuestack.h
Q3Ftp Q3PtrCollection Q3ValueVector
q3ftp.h q3ptrcollection.h q3valuevector.h
Q3GArray Q3PtrDict Q3VBox
q3garray.h q3ptrdict.h q3vbox.h
Q3GCache Q3PtrDictIterator Q3VButtonGroup
q3gcache.h Q3PtrList Q3WhatsThis
Q3GCacheIterator q3ptrlist.h q3whatsthis.h
Q3GDict Q3PtrListIterator Q3WidgetStack
q3gdict.h Q3PtrListStdIterator q3widgetstack.h
Q3GDictIterator q3ptrqueue.h Q3Wizard
Q3GList q3ptrstack.h q3wizard.h
q3glist.h Q3PtrVector qiconset.h
Q3GListIterator q3ptrvector.h Qt3Support
#########################################################################

Yes, Qt4 is a good thing.
Many good/new ideas.
It will keep us all busy for a while.

The question is:
How stable must the API of a good library be ?
Is 4 years enough ?
regards, Rainer Lehrig
http://pvbrowser.org

jacek

Master

  • "jacek" is male

Posts: 2,729

Location: Warsaw, Poland

  • Send private message

2

Tuesday, September 6th 2005, 11:51am

RE: Your experience with Qt3 -> Qt4 ?

Quoted

Originally posted by lehrig
Why is it not possible to reuse the ui files from Qt3 ?
(The generated code will also be different)

It is possible, apart of uic there's also uic3 which handles Qt3 .ui files (if you were using the subclassing approach you shouldn't have a lot of troubles, but I don't know how it works with .ui.h files).

Quoted

Qt Designer seems not to be complete.

Yes, I miss some functionality of the Designer from Qt3 too and I hope that it will be fixed soon.

Quoted

E.g. Why can I not set a pixmap in QLabel ?

It works on my system.

Quoted

Why did they not continue the old classes for ListView, Table and IconView ?
At least for item based programming ?

How about QListWidget, QTableWidget and QTreeWidget?

Quoted

When Qt5 will come out (let's say in 4 years), will we have the same procedure again ?

You will have to ask the Trolls, but I hope that Qt4 is flexible enough and it won't happen again.

  • "wysota" is male

Posts: 4,276

Location: Warsaw, POLAND

  • Send private message

3

Tuesday, September 6th 2005, 12:04pm

I see you're a bit irritated with the difference between Qt3 and Qt4. I don't intend to answer every question you asked here (as I see Jacek already have), but I'll try to focus on the general issue.

Take into consideration, that the current version of Qt4 is Qt 4.0.1. This is an early release, with many bugs and unfinished aspects. It has an architecture different than Qt3 -- all those years seem not to have been wasted. There is an article on Qt Quarterly about the API change between Qt3 and Qt4, read it, you might find it interesting. Have you heard of a project which is perfect and bug-free from the very beginning? I know, I haven't. Don't treat Qt4 as a next version of Qt3. Instead treat it as a separate product, because the internals in Qt4 are completely different than the ones in Qt3. Main paradigms have been kept and that's what's most important. For example the whole drawing scheme has been completely rewritten, so the code responsible for drawing may be buggy, etc.

Many classes have been declared obsolete and have been kept only to enable quick porting of Qt3 apps. These are moved to a separate library, so that if one doesn't want to use any Qt3 code, it's possible not to link with it at all, making the target app lighter and more robust.

Qt4 has a long way ahead of it until it becomes as mature as Qt3 is now. It took more than 4 years to release Qt4, maybe it'll take another five years until Qt5 is released. Let's hope that by then all the Qt4 issues will already have been resolved.

Qt4 is really a giant leap compared to Qt3, it just needs some care until it blossoms and gives fruit, as once it ancesstor did.