LinuxQuestions.org
Visit Jeremy's Blog.
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 10-15-2009, 02:54 AM   #1
sorvad
Member
 
Registered: Apr 2004
Location: Cumbria, England
Distribution: openSuSE, Red Hat, HP-UX
Posts: 61

Rep: Reputation: 15
Qt4, - starting one main window from aqnother


I want to create a Qt4 app which has a main menu window, which can launch other windows (so they can be outside boundaries of main menu window).
To experiment, using Designer, I created a main window with a simple menu and in the same project another main window.
If the second window is class Second and the main menu is class First, I can change my main.cpp to look like:
QApplication a(argc, argv);
First w;
Second s;
w.show();
s.show();
and both windows appear.
However if I alter menu in First to have a menu action "Launchapp" and in first.cpp in slot on_Launchapp_triggered I put my s.show(), the Second window does not appear even though the debugger shows that it runs through the code.

Any idea why?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Starting new terminal window or tab from existing window remaining as root? homerun Linux - Newbie 1 08-14-2009 12:34 PM
I can't see folders on Kmail's main window massix76 Linux - Software 2 06-26-2008 06:00 PM
starting qt4 - compiling problem divukman Programming 1 07-15-2007 12:25 AM
No child is displayed after the main window was hidden - PyGTK2 vargadanis Programming 2 05-30-2007 11:33 AM
Compiling qt4 apps for non-qt4 linux, win, mac birdseye Programming 4 10-31-2005 05:45 AM


All times are GMT -5. The time now is 08:45 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration