Programming :: Multiple Window GUI App In Qt Creator
Aug 3, 2010
For example I want my Qt Creator app to have multiple custom dialogs. How do I manage them? Also, what if I want to replace all the widgets in a window with new ones, how do I manage that in Qt Designer?
I'm a Kindle DX owner and I normally download some free PDFs from the internet, but I prefer to read then using the PRC format. As I'm a Linux user, I can't use Mobipocket Creator, then I want to ask for a alternative.
I have two Debian boxes, A and B. I would like that a window (for example vlc, or whatever) displays on both A and B. The process (i.e., the X11 client) runs on A. If I interact with the window from box A, it should affect the window on box B. And, if I interact with the window from box B, it should affect the window on box A.
I'm in Gnome but if I logout I can get to a menu where I can choose KDE as well as other window managers. The problem is I have a program that's running inside Gnome and I don't want to stop it. Is there some way I can get into KDE without having to stop this program?
How to get AWN to run on two monitors? I want a bar on each monitor. I used to be able to start two instances using a shell script below but that doesn't seem to be working now.
Playing around more with this and it looks like avant no checks to see if there is another instance running and will not start if there is. That is a bummer. Any way to change this?
dccrens@cavermax-ubuntu:~$ DISPLAY=:0.0 avant-window-navigator & [1] 15569 dccrens@cavermax-ubuntu:~$ ** (avant-window-navigator:15569): WARNING **: Another instance of Awn is running [1]+ Done DISPLAY=:0.0 avant-window-navigator
I've browsed the internet, but haven't found a satisfying answer. Hope this forum can help me in the right direction.I'm exploring the possibilities of creating a program that manipulates (writes to) two different video cards.I program in C and hope to avoid high level libraries like Xlib to keep the mem footprint as low and the performance as high as possible. Windowing is not important no desktop environment will be used. Be able to write two pixels (one to each screen) to would do.
How would I go about?To give an idea of the solution I'm looking for:One screen will show thumbnails of images on the hard drive. Clicking an thumbnail on display A will show the selection full screen on display B. On a laptop; preferably thumbnails on the laptop screen and the selected image on the external monitor.Is this possible with just low-level libs or do I need X or some third-party software to make life easy?
I am having trouble writing an Xlib application that displays a window. The most frustrating thing is that I've written applications like this before, and never had any problems. For some reason I cannot get this program to work properly. I'm running KDE and when I launch the program, a "button" for the application will appear on the application panel, however, no window will display. It is possible to right click on the panel button and select the Close item which will successfully close the window.
The following is source code that when built will exhibit the behaviour described above code...
Unfortunatelly since i have no background at all about GUI programming, i dont know even the keyword for that i want to generate a pop up window from my program (written in C) which show a message and an OK button. in my opinion, maybe i should use directly the Xlib library and not the GTK or QT library for example so the program can work almost on every linux system. A code snippet/hint for the pop-up window then?
I want to do a "gallery" on a webpage, ie. a series of thumbnails, whhich when clicked, will popup a new window of a bigger image of that same things (with more details about it, etc.). How do I do that? (I think it's soemthing to with "window.popup" in Javascript, but how do I use that? Can I do it with <a href="something" target=new>?)
I am using window.onbeforeunload to keep people from accidentally leaving. I was hoping to intercept this event, run my own dialog box and load another page that closes the window, or of course, cancel.
I'm needing this because my site is a single page and I can't figure out how long people are visiting for, if I could load an exit page, then I can figure this out.
I have a toplevel window that I want to place depending on another toplevel window. I use gtk_window_move(widget, x, y); At startup this function is called several times and y is changed ones from 412 to 413 and x is always 0(checked with gdb in netbeans). The window gets placed at x=10 and y=400 or so. If I do not use variables but pure ints for x and y it gets placed correctly even if its the same values. I suspect that my window manager notice this change of y and place the widget for me. Is this correct and how do I tell the WM not to do so?
This change of y is due to window size is just a local size and not the correct one as in X. Can i force uppdates from X to the local cache?
I have some ideas about writing a small game in terminal ( just for fun ) using ncurses library. I want to use some kind of menus (in Midnight Commander's style), but there are some problems with rendering windows, that I don't understand. I create a window with newwin(), assign a color pair to it calling wattron() (for example, I want to fill a window with blue background), and then I call my own function wnd_fill() :
How do I find out how many characters fit into a terminal window horizontally and how many lines the terminal window is high (i.e. how many rows and columns are visible - the width and height)? I am using c++ and Linux Mint 8 - Gnome.
I am trying to write a small gtk+-2 program to display whatever image it is given and I was wondering if anyone out there has done something similar. I am not too familiar with writing programs for gtk and its been a while since I've fiddled with C. I went over the tutorial for gtk and it seams pretty easy to get a window to display, but I do not see anything that refers to loading an image or displaying it in the window. I am wondering if this can be done purely with gtk or will I need to use some type of image library like imlib2?
Usually the menu bar, and menus, are displayed within the applications main window. With a small screen this obviously wastes space so my idea is to reserve a location, small square space probably on a corner, on the screen that when clicked it will pop out the current selected applications menu, allow selection, and then disappear again. The application itself would look fullscreen, or if windowed will still not have a menu bar but access available via the "square."
Likewise instead of the usual task bar and "applications/places/system" menus (ala, ubuntu) a second square would be reserved which would pop-out and show the running tasks, followed by the menus, and allow selection, then disappear. Is this possible with GTK+ as it stands, as I'm guessing that by default everything must be contained within an applications main window?
Although having said that, gimp allows the tool windows to be external to the edited document, so perhaps it would be possible to make the menu bar into a toolbox? I guess the difficult problem would be how to make the currently selected applications "tool square" be on top when there could be multiple applications running. The "tool square" and "task/menu square" could be transparent (maybe just an outline) so that although always there they wouldn't hide any underlying windows/programs/etc.
Basically the idea is to get rid of wasted screen, in ubuntu (on gtk/gnome) a minimum of 5 "bars" is wasted screen real-estate:- 1, Running aplications: 2, Ubuntu's main menu bar: 3, Applications status bar: 4, Applications menu bar: 5, Applications description (min/max/close) bar. Take all the above and replace it with two clickable, potentially invisible, squares say where the default "hide all windows" and "deleted trashcan" icons currently reside.
It's been a while since I did any kind of graphics programming, but I would like to start learning how to do graphics stuff in *nix. I started reading the GTK+ 2.0 Tutorial, but a) I've only been able to write a small "Hello World" program, and that tested my patience, and b) I'm not seeing anything which allows you to plot a pixel directly. Back before I migrated to Linux, I used the Windows GDI SetPixel() function for plotting pixels sequentially (this was for a small fractal generator). Mostly what I'm asking is if there's any kind of equivalent function in *nix graphics APIs? GTK+? Would I have to deal with SDL/OpenGL?
I have a server client prog in which server is my 'agent' and client is 'manager'. Following is the code for both agent and manager. I want my agent to send what manager is requesting. But it is not working the way I want. The parameters which manager is requesting, agent has to send to manager but in this program result for those parameters is shown on agent's own terminal window. Where as I want them on manager's window. Secondly, there result is not correct, means it is giving ' 0 K ram and 0 no of process....
I have an array...n i want to display it as a popup window ...the array elements...as buttons that are clickable...
so can i pass an array to the window as argument..i know we can pass parameter values..but array?and is so how can the individual array elements be accessed inside the window?
I'm trying to do the following. from a php webpage click on a link, that opens a shell/cmd and runs an open ping to the device. so it must actually open a shell (for linux) or cmd (for windows) and run a ping to the specified ip. Currently i'm running an exec command, but for this i need to wait for the result to be fetched and print it out. I want to monitor it in realtime, by just clickingon the button. How to get this working?
I use a mencoder line to convert .avi to .mpg (dvd player compatible), it works well but i can only do one file at the time. It requires giving the input and output directories and the files name. I tried using (*.avi *.mpg in the command) on the directory but it just add up all the .avi and convert them into one huge .mpg. My goal is to have a script that would convert all the .avi files from a directory to the same amount of .mpg and also keep the naming of those files. Here is what i work with on single files:
(i) I usually make multiple dir using -p optionex: mkdir -p dicttest/audrep/tdriver/testNow after creating this dir's i stay in current dir instead i want to go directly to test dir how can i acheive this.(ii) When i execute which command as followswhich testerm i will get the location of testterm now i want to open this filewhen i did in this wayhich testterm | vi The file dosent get opened how can i acheive this ?ex:
linuxx86:110$ which testterm /view/rdl110_linuxx86/vobs_usrrdl/sc/testterm linuxx86:110$ which testterm| vi
I feel kind of embarrassed posting here, but this is technically a scripting sub-forum. Here is the problem. I have a folder with various files which include .txt files as well
How can i redirect same content to each of the .txt files in the folder?
I have tried Code: $ echo "hello" > *.txt -bash: !": event not found Code: also cat ~/otherdir/test.txt > *.txt -bash: *.txt: ambiguous redirect Can anyone help me with this?Ok i solved it Code: #! /bin/bash for file in *.txt do echo "Text that needs to be written" > $file done
I have a folder with only 24 files named <number>.dat (i.e. 4.dat, 6.dat and so on) where <number> is between 0 and 256. Each file has just two columns of data and nothing else.
I'm trying to combine all the second columns ($2) together. I've been fiddling around with getline and so far have
which takes file 4.dat and adds $2 from 6.dat, but I want a single command to take each $2 from every file and add them to (for example) 4.dat (having $1 from 4.dat is no problem). A command that takes every file in the folder and grabs $2 and places them in a common file would be ideal. Frankly I can work around if you combine both columns from every file.
It is possible to run multiple instances of a jar executable. Is it possible that only a single instance of the jar runs? Wrappers like JSmooth or Launch4J can be made to run as a single instance. But since there are no such wrappers for linux, I need a way to restrict the jar to a single instance. How to embed the jar file into an executable such it runs a single instance?
I use grep <pattern> abc.* to read the files. But here grep read files in the order of 1,2,3,4 . I want to to grep the files in reverse order like 1st the abc.4 file will be read and abc.1 file will be last.