Beginning project help

Coding + IDE + Code-Editor + Syntax + User-Functions + Anything else

Re: Beginning project help

Postby Slowdown » Sat May 25, 2013 6:45 pm

I assumed that you knew that I would like to also know how to change the border, and the border color

Sorry Tom, did in Designer but i guess you can also do it in Q7B,
Groupbox-designer.png
Groupbox-designer.png (17.06 KiB) Viewed 1911 times
Kind regards,
Slowdown

OSX 10.8.x, VBox Xp, Ubuntu 32/64 bit, EOS 64 bit
Slowdown
 
Posts: 464
Joined: Sat May 01, 2010 7:11 pm
Location: Netherlands

Re: Beginning project help

Postby Henning » Sat May 25, 2013 9:52 pm

This is found in Event.txt, so they should be available. But how???

QWidget:mouseDoubleClickEvent(Event As QMouseEvent)
QWidget:mouseMoveEvent(Event As QMouseEvent)
QWidget:mousePressEvent(Event As QMouseEvent)
QWidget:mouseReleaseEvent(Event As QMouseEvent)
QWidget:moveEvent(Event As QMoveEvent)
QWidget:wheelEvent(Event As QWheelEvent)


Also in SIgnal.txt there is:
Frame:Click(X As Integer, Y As Integer, GlobalX As Integer, GlobalY As Integer, LeftButton As Boolean, RightButton As Boolean, MidButton As Boolean)
Frame:DblClick(X As Integer, Y As Integer, GlobalX As Integer, GlobalY As Integer, LeftButton As Boolean, RightButton As Boolean, MidButton As Boolean)
Frame:Enter()
Frame:Exit()
Frame:GotFocus()
Frame:LostFocus()
Frame:MouseDown(X As Integer, Y As Integer, GlobalX As Integer, GlobalY As Integer, LeftButton As Boolean, RightButton As Boolean, MidButton As Boolean)
Frame:MouseUp(X As Integer, Y As Integer, GlobalX As Integer, GlobalY As Integer, LeftButton As Boolean, RightButton As Boolean, MidButton As Boolean)
Frame:Resize(Width As Integer, Height As Integer, OldWidth As Integer, OldHeight As Integer)


But this does not trigger:
Code: Select all
Signal on_frame1_MouseDown(X As Integer, Y As Integer, GlobalX As Integer, GlobalY As Integer, LeftButton As Boolean, RightButton As Boolean, MidButton As Boolean)
  MsgBox(X & ":" & Y & "-" & GlobalX & ":" & GlobalY & "-" & LeftButton & "-" & RightButton & "-" & MidButton)
  frame1.setStyleSheet("background-color: rgb(255, 255, 0)")
End Signal


/Henning
Henning
 
Posts: 522
Joined: Fri Aug 13, 2010 6:29 pm

Re: Beginning project help

Postby Tommy » Sun May 26, 2013 7:29 pm

Henning,
That is exactly what I want to be able to use. Those signals should be available for most container objects and for the main form too, but I also do not see them in the Q7B IDE.

I hope a way can be found to enable those signals!
Tom
Tommy
 
Posts: 16
Joined: Tue May 07, 2013 10:44 pm
Location: Virginia, USA

Re: Beginning project help

Postby Henning » Sun May 26, 2013 11:04 pm

More tests... after reading a lot of examples...

From Examples/FeatureFullTest/MainWindow...:
Code: Select all
Outlet aLabel As Label Set

Signal on_aLabel_MouseDown(X As Integer, Y As Integer, GlobalX As Integer, GlobalY As Integer, LeftButton As Boolean, RightButton As Boolean, MidButton As Boolean)
  MsgBox("!on_aLabel_MouseDown " & LeftButton & RightButton & MidButton)


Code: Select all
Outlet frame1 As QFrame Set Frame
'Or
Outlet frame1 As Frame Set


FrameError.jpg
FrameError.jpg (26.26 KiB) Viewed 1899 times


Since the Q7b Frame doesn't have all Functions of a QFrame, I guess.... I believed this to be the solution, but... :(

/Henning
Henning
 
Posts: 522
Joined: Fri Aug 13, 2010 6:29 pm

Re: Beginning project help

Postby Tommy » Mon May 27, 2013 12:47 am

Do you think it is a problem with Qt, or a problem with Q7B?

If the groupBox will not work, is there a way I can draw a rectangle and make my own similar to groupBox? But I have not seen any containers that allow the above signals you mentioned.

Maybe Q7B is not finished enough yet to do this kind of programming. Maybe when next version come out.
Tommy
 
Posts: 16
Joined: Tue May 07, 2013 10:44 pm
Location: Virginia, USA

Re: Beginning project help

Postby Henning » Mon May 27, 2013 10:37 am

There are a lot of Qt controls ported to Q7b. Label, TextBox, Frame...
As a container for other controls, I like the Frame.

There is a Q7b Frame but, since it doesn't have *all* QFrame functions, it doesn't compile. If/When this is corrected all those signals will be available. :)

It might be possible, as a temporary work-around, to compile it using QtCreator commenting out the missing Frame_functions... :geek:

I'll try it out when I get time (soon). ;)

/Henning
Henning
 
Posts: 522
Joined: Fri Aug 13, 2010 6:29 pm

Previous

Return to Questions & Answers

Who is online

Users browsing this forum: No registered users and 1 guest

cron