Beginning project help

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

Re: Beginning project help

Postby Henning » Fri May 24, 2013 1:17 am

If you in QtDesigner activate checkable, the clicked signal triggers when the groupBox label or checkbox is clicked....

May I ask what the groupBox_clicked is used for?

Is it possible you can use a toolButton as a container, if that is the usage?

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

Re: Beginning project help

Postby Slowdown » Fri May 24, 2013 11:09 am

If you in QtDesigner activate checkable, the clicked signal triggers when the groupBox label or checkbox is clicked....

That is the same as what i concluded, see the example a few post back 8-)
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 Slowdown » Fri May 24, 2013 6:25 pm

Is there any way to make the border thicker, or change the border color for the groupBox?

yup,
border-qgroupbox.png
border-qgroupbox.png (6.94 KiB) Viewed 2952 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 Slowdown » Fri May 24, 2013 6:52 pm

Noope, another bug to report...
The Signal never triggers.

@Henning and Tommy

This isn't a bug of Q7B.
From Qt,
Signals

void clicked ( bool checked = false )
void toggled ( bool on )

and

void QGroupBox::clicked ( bool checked = false ) [signal]

This signal is emitted when the check box is activated (i.e. pressed down then released while the mouse cursor is inside the button), or when the shortcut key is typed, Notably, this signal is not emitted if you call setChecked().

If the check box is checked checked is true; it is false if the check box is unchecked.

This function was introduced in Qt 4.2.

See also checkable, toggled(), and checked.

To be short there isn't a separate 'Clicked' for QGroupBox.
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 Tommy » Fri May 24, 2013 10:15 pm

Henning wrote:May I ask what the groupBox_clicked is used for?

I want to find MouseDown, MouseUp, and Clicked. I would also like to have a signal for "dragged". Using these I want to be
able to create a container that the border can be dragged at run time to make the container bigger or smaller. I want to be able to drag icons from one container and drop into a second container.

Is it possible you can use a toolButton as a container, if that is the usage?

Maybe, I will try that now to see if it works.

Thank you -
Tom
Last edited by Tommy on Sat May 25, 2013 1:14 pm, edited 1 time in total.
Tommy
 
Posts: 16
Joined: Tue May 07, 2013 10:44 pm
Location: Virginia, USA

Re: Beginning project help

Postby Tommy » Fri May 24, 2013 10:18 pm

Slowdown wrote:
Is there any way to make the border thicker, or change the border color for the groupBox?

yup,
border-qgroupbox.png


I assumed that you knew that I would like to also know how to change the border, and the border color. Would you please show me the code needed? Also, how did you find out the information, so I don't have to always ask questions and bother you.

Thank you -
Tom
Tommy
 
Posts: 16
Joined: Tue May 07, 2013 10:44 pm
Location: Virginia, USA

Re: Beginning project help

Postby Tommy » Fri May 24, 2013 10:54 pm

Henning,
toolButton does not appear to be a container, also does not have mousedown/up or click.

I would like a container with a border and a title, just like the groupBox and be able to drag the border to change the size. In VB6 it was sometimes called a "rubber band box" and could be made from most container objects. Also need to know mouse coordinates in the container. I have made these in VB6 and Gambas successfully. Gambas is Linux only, VB6 works but is very old and may not be supported in the future. I would like to use Q7B because it works in Windows. I need my application to work in Windows.

Tom
Tommy
 
Posts: 16
Joined: Tue May 07, 2013 10:44 pm
Location: Virginia, USA

Re: Beginning project help

Postby Henning » Sat May 25, 2013 4:38 pm

@Slowdown

I don't agree on that one. Below is the CommanButton. Also possible to make checkable and checked. The default False is for not checkable and checked.

void QAbstractButton::clicked ( bool checked = false ) [signal]

If the groupBox is Checked/UnChecked should be returned as the parameter, when the groupBox itself is clicked.

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

Re: Beginning project help

Postby Tommy » Sat May 25, 2013 5:33 pm

Henning,
You suggested toolButton, which is not a container.

I do not want to have checked/unchecked box shown.

For me it did not execute click code when the inside of the groupBox was clicked, only when the checkBox or the label was clicked.
I need to know the coordinates of the mouse inside of the groupBox as a minimum.

I could use any other container that will allow a click inside of it, and give the coordinates of the mouse pointer.
Tom
Tommy
 
Posts: 16
Joined: Tue May 07, 2013 10:44 pm
Location: Virginia, USA

Re: Beginning project help

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

@Henning,

The signal Clicked is only emitted if the checkbox is checked/unchecked.
You can check this, neither of the containers will return an Signal Clicked.
Last edited by Slowdown on Sat May 25, 2013 6:56 pm, edited 1 time in total.
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

PreviousNext

Return to Questions & Answers

Who is online

Users browsing this forum: Google [Bot] and 1 guest

cron