[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Qt-problem...



Hejsan!!

Jag är en nybörjare i C/C++ och har precis börjat att göra om ett av mina text-baserade program till Qt.
Nu undrar jag om någon här vet hur man gör för att lägga till en annan funktion till en knapp än "quit()",  programmet
är inte så användbart om det bara går att starta och att stänga av  ;)

En knapp-funktion kan se ut så här:

	  QObject::connect(&test, SIGNAL(clicked()), &a, SLOT(quit()));

Här är det knappen "test" som jag vill tilldela en annan funktion än quit(), som står efter SLOT. Jag har provat med en
vanlig void-funktion, exempel:
	"void knapptest(){kod...}", men det hjälper intem den går inte att använda.
Vad gör jag fel??
Kanske kan någon visa ett enkelt exempel på en fungerande knapp som kanske ändrar en text någonstans i programmet eller
något så enkelt??


-- 
     If the truth is out there, does anyone have the URL?       #####
                                                               #######
                  @   // Johan Andersson                       ##O#O##
 ######          @@#                                           #VVVVV#
   ##             #                                          ##  VVV  ##
   ##         @@@   ### ####   ###    ###  ##### #####      #          ##
   ##        @  @#   ###    ##  ##     ##    ###  ##       #            ##
   ##       @   @#   ##     ##  ##     ##      ###         #            ###
   ##          @@#   ##     ##  ##     ##      ###        QQ#           ##Q
   ##       # @@#    ##     ##  ##     ##     ## ##     QQQQQQ#       #QQQQQQ
   ##      ## @@# #  ##     ##  ###   ###    ##   ##    QQQQQQQ#     #QQQQQQQ
 ############  ###  ####   ####   #### ### ##### ######   QQQQQ#######QQQQQ



 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 20:07 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *