Combining Qt with GTK only one problem!


 
Thread Tools Search this Thread
Top Forums Programming Combining Qt with GTK only one problem!
# 8  
Old 06-28-2012
Show your updated code please.
This User Gave Thanks to Corona688 For This Post:
# 9  
Old 06-29-2012
Here you are:
Code:
void show_app(MainWindow *data)
{
    qDebug() << "1";
    data->show();
    qDebug() << "2";
}


void MainWindow::make_indicator()
{
    if(appindicator){
        //appindicator has already been created
        return;
    }
    appindicator = app_indicator_new("Format Junkie Indicator", "formatjunkie", APP_INDICATOR_CATEGORY_APPLICATION_STATUS);
    GtkWidget* showapp_option;
    GtkWidget* indicatormenu = gtk_menu_new();
    GtkWidget* item = gtk_menu_item_new_with_label("Format Junkie main menu");
    gtk_menu_item_set_submenu(GTK_MENU_ITEM(item), indicatormenu);

    showapp_option = gtk_menu_item_new_with_label("Show App!");
    g_signal_connect(showapp_option, "activate", G_CALLBACK(show_app), this);
    gtk_menu_shell_append(GTK_MENU_SHELL(indicatormenu), showapp_option);

    gtk_widget_show_all(indicatormenu);
    app_indicator_set_status(appindicator, APP_INDICATOR_STATUS_ACTIVE);
    app_indicator_set_attention_icon(appindicator, "dialog-warning");

    app_indicator_set_menu(appindicator, GTK_MENU (indicatormenu));
}

I don't get any warning with the above code... The qDebug() calls in show_app() function is so as to be sure that the crash happens when data->show() is called. With the above code, only '1' is outputed and not '2' (this is a little quicker way to see what's wrong, without debugging the application step by step)
# 10  
Old 07-01-2012
Anyone SmilieSmilieSmilieSmilieSmilieDSmilieSmilieSmilie ?
# 11  
Old 07-03-2012
Does it crash when you comment out data->show() ?
# 12  
Old 07-03-2012
This User Gave Thanks to hakermania For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Fedora

GTK Themes

Hi, So, I have a GTK based GUI app. I used GTKdevel-2.24 to develop and compile it on two different distros of linux: Fedora 14 and Linaro (tablet). All of my code was the same for each but compiled on each platform separately (32bit and ARM). Both distros run the application. On Fedora 14... (0 Replies)
Discussion started by: fedora18
0 Replies

2. Shell Programming and Scripting

awk problem - combining awk statements

i have a datafile that has several lines that look like this: 2,dataflow,Sun Mar 17 16:50:01 2013,1363539001,2990,excelsheet,660,mortar,660,4 using the following command: awk -F, '{$3=strftime("%a %b %d %T %Y,%s",$3)}1' OFS=, $DATAFILE | egrep -v "\-OLDISSUES," | ${AWK} "/${MONTH} ${DAY}... (7 Replies)
Discussion started by: SkySmart
7 Replies

3. UNIX for Dummies Questions & Answers

Gtk-WARNING **:

Hi all, I want to run a 32 bit program on a 64 bit linux machine. Installing the program was no issue but when I try to run it I get Warnings that look like this: Gtk-WARNING **: Unable to locate theme engine in module_path: "oxygen-gtk" Gtk-WARNING **: Unable to locate theme engine in... (3 Replies)
Discussion started by: friend
3 Replies

4. Programming

curses.h not found , gtk/gtk.h not found

i have downloaded <libncurses5-dev_5.7+20101128-1_i386.deb> and <ndk++-0.0.1alpha4.tar.bz2> which contains the header files curses.h and gtk/gtk.h .. i have also included them using .. #include "/home/ball/Desktop/Sudoku/project/libncurses5-dev_5.7+20101128-1_i386/usr/include/curses.h" ... (2 Replies)
Discussion started by: upvan111
2 Replies

5. Shell Programming and Scripting

Problem combining two variables into one

Hello, I have a problem combining two variables into one. I did the following: in my env variables i had set PATH_DESTINATION_1=/root/path_one PATH_DESTINATION_2=/root/path_two #!/usr/bin/ksh count=1 count_path=2 while do (3 Replies)
Discussion started by: Eraser
3 Replies

6. Programming

GUI without GTK - Is it possible?

Is GUI programming without GTK possible? If so, how? Or what libraries should I #include? Google seems to tell me that GUI programming in C++ is much more popular then in C. I'm assuming because of the Object Orientedness (if that is even a word)? Before you say things like "Search the forums",... (5 Replies)
Discussion started by: Octal
5 Replies

7. Post Here to Contact Site Administrators and Moderators

GTK+ project

Hai, I am santhosh,I am fresher to this Forum,I want details about GTK+ Project(All Widgets--- I mean how they are programming in callback.c file). if it possible please send information regarding this Glade tool.I want to interface glade with Modbus protocol, Thankyou with best regards,... (0 Replies)
Discussion started by: santhosh.linux
0 Replies

8. Linux

GTK+ hates me

I am very new to the linux environment. I have been interested in it for years but have just recently had the courage to pop that install disk into my PC. Because of it's ease of installation, I installed Mandrake 9.1 and I'm running KDE3.1 for my GUI. Right now I'm trying to conquer the world... (5 Replies)
Discussion started by: n0data
5 Replies

9. UNIX for Dummies Questions & Answers

how to start my gtk+

hi, i am a total dummy of unix. i am not used to the unix convention and practice. currently i am trying to install and use the solaris GUI based ftp program called gtk+ (gtk+-1.2.10-sol8-sparc-local.gz). i downloaded it and installed it successfully on my Sun Solaris sparc version 8. ... (4 Replies)
Discussion started by: champion
4 Replies
Login or Register to Ask a Question