What i understand from your question is that you need a dropdown list with both flag image and language if it is so then use the below code.
This code i have written and tested on qtranslate version 2.5.28 although it will work for other version as well reference line numbers are given according to this version.
Step 1: Go to the plugin folder and open qtranslate/qtranslate_widget.php. There in line no. 112 you will find case:'both';
Now where that case ends its line no 123
Below that add the following code (another case written)
`
case 'bothkria':
if($_REQUEST['lang']!=""){ $kria = $_REQUEST['lang'];}else{$kria = $q_config['default_language'];}
echo '<span class="s_selected"><img src="'.get_option('home').'/wp-content/'.$q_config['flag_location'].''.$q_config['flag'][$kria].'" alt="'.$q_config['flag'][$kria].'" /> '.$q_config['language_name'][$kria].'</span>
<ul class="s_options">';
foreach(qtrans_getSortedLanguages() as $language){
echo '<li><a href="'.qtrans_convertURL($url, $language).'"><img src="'.get_option('home').'/wp-content/'.$q_config['flag_location'].''.$q_config['flag'][$language].'" alt="'.$q_config['language_name'][$language].'" />'.$q_config['language_name'][$language].'</a></li>';
}
echo '</ul>';
break;
Step 2: Where you want to display it just paste the below code
<div id="language_switcher" class="s_switcher"><?php echo qtrans_generateLanguageSelectCode('bothkria'); ?></div>
Step 3: CSS Classes it was accordingly designed given here for your help you can change according to your theme.
`
.s_switcher {
z-index: 10;
position: absolute;
top:6px;
right:255px;
font-size: 11px;
background: #f6f6f6 url(../images/dropdown.gif) no-repeat 100% 6px;
border-top: 1px solid #e9e9e9;
border-left: 1px solid #e9e9e9;
border-right: 1px solid #f6f6f6;
border-bottom: 1px solid #f6f6f6;
border-radius: 3px;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
}
.s_switcher ul {
margin-bottom: 0;
}
.s_switcher span.s_selected,
.s_switcher li,
.s_switcher li a
{
display: block;
height: 22px;
line-height: 20px;
text-indent: 7px;
}
.s_switcher span.s_selected {
cursor: default;
color: #999;
}
.s_switcher .s_options {
cursor: pointer;
display: none;
}
.s_switcher img {
display: inline;
margin: -1px 3px 0 0;
vertical-align: middle;
margin-left:10px;
}
#language_switcher .s_selected, #language_switcher .s_options li a {
font-family:"Lucida Sans Unicode", "Lucida Grande", sans-serif;
text-decoration:none;
font-size:12px;
color:#333;
}
#language_switcher .s_options li a{
color:#999;}
#language_switcher .s_options li a:hover{
color:#333;}
`
Done upload the files and check.
Hope this is what you wanted.
Enjoy
Thank you!