Finding what data has been selected in QComboBox [duplicate]





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







1
















This question already has an answer here:




  • PyQT5 QComboBox - get value of combobox

    1 answer



  • How do you get the current text contents of a QComboBox?

    4 answers




I would like to know what function is needed to find the value that has been selected within the Drop down menu. The data must be updated live within the application for the function to be worthwhile.



The code I have written to create the QComboBox is as follows:



    dropDown = QComboBox(self)
dropDown.addItem('Nvidia')
dropDown.addItem('AMD')
dropDown.setObjectName('GPU brand')
dropDown.setGeometry(250, 350, 90, 25)


Essentially I would like to write a function which will look at which of the two items has been selected. Then use that data to run another two functions, separate from each other for either AMD or Nvidia.










share|improve this question















marked as duplicate by eyllanesc pyqt5
Users with the  pyqt5 badge can single-handedly close pyqt5 questions as duplicates and reopen them as needed.

StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Jan 3 at 16:35


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.



















  • The QComboBox description explains everything.

    – ekhumoro
    Jan 3 at 16:27











  • Use dropDown.currentText() or the signal currentTextChanged

    – eyllanesc
    Jan 3 at 16:34


















1
















This question already has an answer here:




  • PyQT5 QComboBox - get value of combobox

    1 answer



  • How do you get the current text contents of a QComboBox?

    4 answers




I would like to know what function is needed to find the value that has been selected within the Drop down menu. The data must be updated live within the application for the function to be worthwhile.



The code I have written to create the QComboBox is as follows:



    dropDown = QComboBox(self)
dropDown.addItem('Nvidia')
dropDown.addItem('AMD')
dropDown.setObjectName('GPU brand')
dropDown.setGeometry(250, 350, 90, 25)


Essentially I would like to write a function which will look at which of the two items has been selected. Then use that data to run another two functions, separate from each other for either AMD or Nvidia.










share|improve this question















marked as duplicate by eyllanesc pyqt5
Users with the  pyqt5 badge can single-handedly close pyqt5 questions as duplicates and reopen them as needed.

StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Jan 3 at 16:35


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.



















  • The QComboBox description explains everything.

    – ekhumoro
    Jan 3 at 16:27











  • Use dropDown.currentText() or the signal currentTextChanged

    – eyllanesc
    Jan 3 at 16:34














1












1








1









This question already has an answer here:




  • PyQT5 QComboBox - get value of combobox

    1 answer



  • How do you get the current text contents of a QComboBox?

    4 answers




I would like to know what function is needed to find the value that has been selected within the Drop down menu. The data must be updated live within the application for the function to be worthwhile.



The code I have written to create the QComboBox is as follows:



    dropDown = QComboBox(self)
dropDown.addItem('Nvidia')
dropDown.addItem('AMD')
dropDown.setObjectName('GPU brand')
dropDown.setGeometry(250, 350, 90, 25)


Essentially I would like to write a function which will look at which of the two items has been selected. Then use that data to run another two functions, separate from each other for either AMD or Nvidia.










share|improve this question

















This question already has an answer here:




  • PyQT5 QComboBox - get value of combobox

    1 answer



  • How do you get the current text contents of a QComboBox?

    4 answers




I would like to know what function is needed to find the value that has been selected within the Drop down menu. The data must be updated live within the application for the function to be worthwhile.



The code I have written to create the QComboBox is as follows:



    dropDown = QComboBox(self)
dropDown.addItem('Nvidia')
dropDown.addItem('AMD')
dropDown.setObjectName('GPU brand')
dropDown.setGeometry(250, 350, 90, 25)


Essentially I would like to write a function which will look at which of the two items has been selected. Then use that data to run another two functions, separate from each other for either AMD or Nvidia.





This question already has an answer here:




  • PyQT5 QComboBox - get value of combobox

    1 answer



  • How do you get the current text contents of a QComboBox?

    4 answers








python pyqt5






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 3 at 10:02







Sebastian Dixon

















asked Jan 3 at 16:02









Sebastian DixonSebastian Dixon

5511




5511




marked as duplicate by eyllanesc pyqt5
Users with the  pyqt5 badge can single-handedly close pyqt5 questions as duplicates and reopen them as needed.

StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Jan 3 at 16:35


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.









marked as duplicate by eyllanesc pyqt5
Users with the  pyqt5 badge can single-handedly close pyqt5 questions as duplicates and reopen them as needed.

StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Jan 3 at 16:35


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.















  • The QComboBox description explains everything.

    – ekhumoro
    Jan 3 at 16:27











  • Use dropDown.currentText() or the signal currentTextChanged

    – eyllanesc
    Jan 3 at 16:34



















  • The QComboBox description explains everything.

    – ekhumoro
    Jan 3 at 16:27











  • Use dropDown.currentText() or the signal currentTextChanged

    – eyllanesc
    Jan 3 at 16:34

















The QComboBox description explains everything.

– ekhumoro
Jan 3 at 16:27





The QComboBox description explains everything.

– ekhumoro
Jan 3 at 16:27













Use dropDown.currentText() or the signal currentTextChanged

– eyllanesc
Jan 3 at 16:34





Use dropDown.currentText() or the signal currentTextChanged

– eyllanesc
Jan 3 at 16:34












0






active

oldest

votes

















0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes

Popular posts from this blog

'app-layout' is not a known element: how to share Component with different Modules

android studio warns about leanback feature tag usage required on manifest while using Unity exported app?

WPF add header to Image with URL pettitions [duplicate]