Beginning project help

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

Beginning project help

Postby Tommy » Thu May 09, 2013 11:31 pm

For my first project with Q7B I want to have a ListBox with Icons. I would like to drag one or more Icons from ListBox items and have it appear in another container such as a Frame (or on the form).

In addition I would like to be able to at run time, move and resize a Frame container (or other similar). This container will then hold the Icons which have been dragged from the ListBox as explained above.

I have been searching through the example programs, but so far have not found anything similar to what I want to do. Many years ago I did this successfully in VB6 but I am a little rusty in my programming skills it seems.

Thanks in advance...
Tommy
 
Posts: 16
Joined: Tue May 07, 2013 10:44 pm
Location: Virginia, USA

Re: Beginning project help

Postby Slowdown » Sun May 12, 2013 6:59 am

Hi Tommy,

small project about resize controls.
Start.zip
(1.3 KiB) Downloaded 95 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 Tommy » Thu May 16, 2013 11:32 pm

Thanks, I will look at it.
Tommy
 
Posts: 16
Joined: Tue May 07, 2013 10:44 pm
Location: Virginia, USA

Re: Beginning project help

Postby Tommy » Sat May 18, 2013 2:18 pm

Thanks Slowdown,
That was similar to one of the example programs and I have learned how it works.

What I want to do is make a GroupBox sizable during runtime the same way as the size is changed in Qt Designer using the mouse pointer and the eight little squares. The sizeable mode could be selected by right-click of the groupBox maybe.

Another way would be the ability to drag the outline of the groupBox at runtime to change the size.

Any ideas?

Also would like to change the background color of the groupBox. I have tried changing the pallette colors in Qt Designer but have not found the name for the "background" color.

The frustrating part of this for me, is that I know how to do this in VB6. I have programmed in VB6 for more than 6 years, yet in Q7B I can only do very simple things with great difficulty.

Thanks in advance.
Tommy
 
Posts: 16
Joined: Tue May 07, 2013 10:44 pm
Location: Virginia, USA

Re: Beginning project help

Postby Henning » Sat May 18, 2013 6:06 pm

YourControl.setStyleSheet("background-color: rgb(0, 255, 0)")

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

Re: Beginning project help

Postby Tommy » Mon May 20, 2013 8:35 pm

OK, I'll try that.

Is it possible to do in Qt Designer? Are only some items changeable using the designer? I thought that the whole idea was to use the Qt Designer to make the user interface and set initial values, then write code to add functionality.

I also noticed that the the "Save" icon does not work, or at least changes made do not show up when running Q7B program. It does work if I use "Save as" and answer yes to "overwrite?" File/save also does not work.
Tommy
 
Posts: 16
Joined: Tue May 07, 2013 10:44 pm
Location: Virginia, USA

Re: Beginning project help

Postby Henning » Mon May 20, 2013 8:49 pm

In QtDesigner, right-click on a control, and select Change StyleSheet.

Just tested to change backcolor of a LineEdit, and it shows when Run in the IDE.

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

Re: Beginning project help

Postby Slowdown » Tue May 21, 2013 3:11 pm

I also noticed that the the "Save" icon does not work, or at least changes made do not show up when running Q7B program.

See,
viewtopic.php?f=1&t=343
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 » Tue May 21, 2013 7:25 pm

what Henning wanted to tell,

In Qt designer,
Designer.png
Designer.png (4.45 KiB) Viewed 1853 times


Running app,
Running.png
Running.png (7.31 KiB) Viewed 1853 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 Tommy » Wed May 22, 2013 10:55 pm

When I change stylesheet, the background color changes in Qt Designer, but when program is run, the background color is not changed. I am using a groupBox.

There does not seem to be a signal or event for "click" in a groupBox. Is there a way to add one?


I am beginning to think it will not be possible to do even the simple things I want to do with Q7B.
Tommy
 
Posts: 16
Joined: Tue May 07, 2013 10:44 pm
Location: Virginia, USA

Next

Return to Questions & Answers

Who is online

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

cron