Looks like a bug -
StatusBar.ShowMessage2(Message as String,TimeOutInMilliSeconds As Integer) gives error.
Details:: Qt 4.8.0 on WinXP SP3 on VBox 4.2.10 on OSX 10.6.8 using VS or Ming compiler.
Code :: MainWindow with PushButton
Outlet bugDemo As QPushButton
Outlet StatusBar As QStatusBar
Signal on_bugDemo_clicked(Checked As Boolean)
'*************************************************************************************************************
' Interrogate StatusBar Object
'*************************************************************************************************************
Dim sb As String
sb = "Here we go on a long journey into the Pandora's Box that is Q7B."
StatusBar.ShowMessage(sb) ' OK
MsgBox(":: Status Bar Object ::", "Observe the Status Bar")
StatusBar.ClearMessage 'OK
Dim lcdNumber As QLCDNumber
lcdNumber.intValue = 42
StatusBar.AddPermanentWidget(lcdNumber) 'OK
sb = "The Answer to the Universe. StatusBar.AddPermanentWidget ::-> "
StatusBar.ShowMessage(sb)
sb = "That's all folks - I will depart shortly"
' delete gcc folder before trying each line
' try Class Sub
' StatusBar.showMessage(sb, 5000)' Fail, not expected - specified as per Lang Ref
' StatusBar.showMessage(sb)' Fail, expected - not specified as per Lang Ref
' try Object Sub
' StatusBar.ShowMessage(sb)'OK, expected - specified as per Lang Ref
StatusBar.ShowMessage2(sb, 5000)' Fail, not expected - specified as per Lang Ref
' StatusBar.ShowMessage(sb, 5000)' Fail, expected - not specified as per Lang Ref
' StatusBar.ShowMessage2(sb)' Fail, expected - not specified as per Lang Ref
' not working
' Dim cm As String
' cm = Str(StatusBar.currentMessage) ' null value?
' MsgBox("Current Message is " + cm)
' not working
' Dim pmLabel As QLabel
' pmLabel.Text = "Permanent Message using QLabel"
' StatusBar.addWidget(pmLabel)
End Signal
Result ::
Using VS -
MainWindow.cpp
Generating Code...
(Initial error box) ' this happens occasionally usually a precursor to a fatal COMDAT error that requires Q7B install.
Q7Basic: syntax error or parser error - NMAKE : U1077: '"C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\cl.EXE"' : return code '0x2'
Stop.
(Next Error box) ' the usual error for this issue.
error C3861: 'Q7B_STATUSBAR_SHOWMESSAGE2': identifier not found
Using Ming -
Q7Basic: syntax error or parser error - MainWindow.cpp: In member function 'void MainWindow::Q7B_on_bugDemo_clicked(QSharedPointer<Q7B_id>)':
MainWindow.cpp:109: error: 'Q7B_STATUSBAR_SHOWMESSAGE2' was not declared in this scope
mingw32-make[1]: *** [debug/MainWindow.o] Error 1
mingw32-make: *** [debug] Error 2
Cheers,
Blane