LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 09-13-2004, 11:07 PM   #1
JSmith
LQ Newbie
 
Registered: Apr 2004
Posts: 18

Rep: Reputation: 0
KDevelop 3 and QT-Designer


Hey folks,

What are you supposed to do with the .ui file created with QT-Designer? I have it in my debug/src directory.

When I compile it creates a .h, a .cpp, and .moc file from it...so all seems good. But it also spits out a ton of errors saying that what is defined in the .moc file was already defined in the .cpp

I tried doing a "Clean Project" and a "Dist Clean", and then rerunning "AutoMake and Friends" and 'configure". After doing so, all 3 of those files are deleted. But when I compile, they all come back and spit out the same errors.

Here's an example of the errors: How do you prevent this?



/home/myUser/myProject/debug/src/mainWindow.cpp:30: multiple definition of `mainWindow::mainWindow[not-in-charge](QWidget*, char const*, bool, unsigned)'
*mainWindow.o(.text+0x0):/home/myUser/myProject/debug/src/mainWindow.cpp:30: first defined here
*mainWindow.o(.text+0xa7a): In function `mainWindow::languageChange()':
*/home/myUser/myProject/debug/src/mainWindow.cpp:81: multiple definition of `mainWindow::languageChange()'
*mainWindow.o(.text+0xa7a):/home/myUser/myProject/debug/src/mainWindow.cpp:81: first defined here
*mainWindow.o(.text+0x4d4): In function `mainWindow::mainWindow[in-charge](QWidget*, char const*, bool, unsigned)':
*/home/myUser/myProject/debug/src/mainWindow.cpp:30: multiple definition of `mainWindow::mainWindow[in-charge](QWidget*, char const*, bool, unsigned)'
*mainWindow.o(.text+0x4d4):/home/myUser/myProject/debug/src/mainWindow.cpp:30: first defined here
*mainWindow.o(.text+0x9a8): In function `mainWindow::~mainWindow [not-in-charge]()':
*/home/myUser/myProject/debug/src/mainWindow.cpp:72: multiple definition of `mainWindow::~mainWindow [not-in-charge]()'
*mainWindow.o(.text+0x9a8):/home/myUser/myProject/debug/src/mainWindow.cpp:72: first defined here
*mainWindow.o(.text+0x9ee): In function `mainWindow::~mainWindow [in-charge]()':
*/home/myUser/myProject/debug/src/mainWindow.cpp:72: multiple definition of `mainWindow::~mainWindow [in-charge]()'
*mainWindow.o(.text+0x9ee):/home/myUser/myProject/debug/src/mainWindow.cpp:72: first defined here
*mainWindow.o(.text+0xa34): In function `mainWindow::~mainWindow [in-charge deleting]()':
*/home/myUser/myProject/debug/src/mainWindow.cpp:72: multiple definition of `mainWindow::~mainWindow [in-charge deleting]()'
*mainWindow.o(.text+0xa34):/home/myUser/myProject/debug/src/mainWindow.cpp:72: first defined here
*mainWindow.o(.text+0xc96): In function `mainWindow::slotSourceAddrClicked()':
*/home/myUser/myProject/debug/src/mainWindow.cpp:92: multiple definition of `mainWindow::slotSourceAddrClicked()'
*mainWindow.o(.text+0xc96):/home/myUser/myProject/debug/src/mainWindow.cpp:92: first defined here
*mainWindow.o(.text+0xcae): In function `mainWindow::slotDestAddrClicked()':
*/home/myUser/myProject/debug/src/mainWindow.cpp:97: multiple definition of `mainWindow::slotDestAddrClicked()'
*mainWindow.o(.text+0xcae):/home/myUser/myProject/debug/src/mainWindow.cpp:97: first defined here
*mainWindow.o(.text+0xcc6): In function `mainWindow::slotUpdatePortsClicked()':
*/home/myUser/myProject/debug/src/mainWindow.cpp:102: multiple definition of `mainWindow::slotUpdatePortsClicked()'
*mainWindow.o(.text+0xcc6):/home/myUser/myProject/debug/src/mainWindow.cpp:102: first defined here
 
Old 09-15-2004, 09:20 PM   #2
JSmith
LQ Newbie
 
Registered: Apr 2004
Posts: 18

Original Poster
Rep: Reputation: 0
anyone?
 
Old 09-15-2004, 09:40 PM   #3
leonscape
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313

Rep: Reputation: 48
I recommended you read this Qt Designer & KDevelop 3 which covers how to use these programs together best.
 
Old 09-16-2004, 12:55 PM   #4
alexrait1
Member
 
Registered: Jul 2003
Location: Israel
Distribution: slackware current kernel 2.6.9
Posts: 70

Rep: Reputation: 15
Suppose you create a ui file with qt-designer. Actually you look at it as it was some kind of a base class from which you will subclass your own.
In kdevelop 3 you can add the ui file (in addition if you have ui.h just add it into the project).
Suppose your filename is coolgui.ui, and the name of the class is coolgui, so all you have to do is to include coolgui.h (even if you don't see that file currently, qt tools will make sure it will appear during the compilation) and to subclass.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
DB Designer ewinandar LinuxQuestions.org Member Success Stories 0 11-17-2004 07:59 PM
Qt designer Rozi Linux - Software 0 05-19-2004 09:49 AM
qt designer nitk Linux - Newbie 1 11-03-2003 09:04 AM
qt designer help.......... nitk Linux - Software 2 10-30-2003 09:22 AM
QT Designer Tynoan Linux - Software 0 09-10-2003 02:40 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:11 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration